mssdemux: fix assertions when a stream caps can't be created

Fixes two assertions related to cleanup for a pad that couldn't
be exposed because the caps couldn't be identified from the
Manifest

Fixes #699921
This commit is contained in:
Thiago Santos 2013-05-17 11:37:30 -03:00
parent ef66e39d03
commit 504142ea93

View file

@ -288,7 +288,8 @@ gst_mss_demux_stream_free (GstMssDemuxStream * stream)
gst_object_unref (stream->pad);
stream->pad = NULL;
}
gst_caps_unref (stream->caps);
if (stream->caps)
gst_caps_unref (stream->caps);
g_free (stream);
}
@ -905,8 +906,6 @@ gst_mss_demux_process_manifest (GstMssDemux * mssdemux)
GstMssDemuxStream *stream = iter->data;
iter = g_slist_next (iter); /* do it ourselves as we want it done in the beginning of the loop */
if (!gst_mss_demux_expose_stream (mssdemux, stream)) {
if (stream->pad)
gst_element_remove_pad (GST_ELEMENT_CAST (mssdemux), stream->pad);
gst_mss_demux_stream_free (stream);
mssdemux->streams = g_slist_delete_link (mssdemux->streams, current);
}