rmdemux: set/send caps after activating the source pads

Makes sure the caps event isn't dropped immediately.
This commit is contained in:
Tim-Philipp Müller 2012-07-18 16:46:46 +01:00
parent d6dbd2094e
commit 1c07373c2b

View file

@ -1479,7 +1479,6 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
gst_pad_use_fixed_caps (stream->pad); gst_pad_use_fixed_caps (stream->pad);
gst_pad_set_caps (stream->pad, stream_caps);
gst_pad_set_event_function (stream->pad, gst_pad_set_event_function (stream->pad,
GST_DEBUG_FUNCPTR (gst_rmdemux_src_event)); GST_DEBUG_FUNCPTR (gst_rmdemux_src_event));
gst_pad_set_query_function (stream->pad, gst_pad_set_query_function (stream->pad,
@ -1488,6 +1487,7 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
GST_DEBUG_OBJECT (rmdemux, "adding pad %s with caps %" GST_PTR_FORMAT GST_DEBUG_OBJECT (rmdemux, "adding pad %s with caps %" GST_PTR_FORMAT
", stream_id=%d", GST_PAD_NAME (stream->pad), stream_caps, stream->id); ", stream_id=%d", GST_PAD_NAME (stream->pad), stream_caps, stream->id);
gst_pad_set_active (stream->pad, TRUE); gst_pad_set_active (stream->pad, TRUE);
gst_pad_set_caps (stream->pad, stream_caps);
gst_element_add_pad (GST_ELEMENT_CAST (rmdemux), stream->pad); gst_element_add_pad (GST_ELEMENT_CAST (rmdemux), stream->pad);
gst_pad_push_event (stream->pad, gst_event_new_stream_start ()); gst_pad_push_event (stream->pad, gst_event_new_stream_start ());