ffdemux: activate pad before setting caps

This commit is contained in:
Wim Taymans 2012-03-13 13:24:23 +01:00
parent 575cb87091
commit c2469e82f9

View file

@ -974,6 +974,7 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
g_free (padname); g_free (padname);
gst_pad_use_fixed_caps (pad); gst_pad_use_fixed_caps (pad);
gst_pad_set_active (pad, TRUE);
gst_pad_set_caps (pad, caps); gst_pad_set_caps (pad, caps);
gst_caps_unref (caps); gst_caps_unref (caps);
@ -1001,7 +1002,6 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
demux->streams[avstream->index] = stream; demux->streams[avstream->index] = stream;
/* activate and add */ /* activate and add */
gst_pad_set_active (pad, TRUE);
gst_element_add_pad (GST_ELEMENT (demux), pad); gst_element_add_pad (GST_ELEMENT (demux), pad);
/* metadata */ /* metadata */