tsdemux: Activate pad before settings caps

https://bugzilla.gnome.org/show_bug.cgi?id=665677
This commit is contained in:
Matej Knopp 2011-12-06 17:37:45 +01:00 committed by Edward Hervey
parent 4917e16458
commit 4a8b6f0121

View file

@ -1185,6 +1185,7 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
GST_LOG ("stream:%p creating pad with name %s and caps %s", stream, name,
gst_caps_to_string (caps));
pad = gst_pad_new_from_template (template, name);
gst_pad_set_active (pad, TRUE);
gst_pad_use_fixed_caps (pad);
gst_pad_set_caps (pad, caps);
gst_pad_set_query_function (pad, gst_ts_demux_srcpad_query);
@ -1254,7 +1255,6 @@ activate_pad_for_stream (GstTSDemux * tsdemux, TSDemuxStream * stream)
if (stream->pad) {
GST_DEBUG_OBJECT (tsdemux, "Activating pad %s:%s for stream %p",
GST_DEBUG_PAD_NAME (stream->pad), stream);
gst_pad_set_active (stream->pad, TRUE);
gst_element_add_pad ((GstElement *) tsdemux, stream->pad);
GST_DEBUG_OBJECT (stream->pad, "done adding pad");
} else