tsdemux: Set caps/tags in the GstStream object before pushing the stream-start event

Otherwise downstream will get a more or less empty GstStream although we
already know a lot about it at this point.
This commit is contained in:
Sebastian Dröge 2017-01-24 23:10:19 +02:00
parent 538c4456aa
commit 046aad8c1b

View file

@ -1618,15 +1618,15 @@ done:
GST_STREAM_FLAG_SPARSE);
}
stream->sparse = sparse;
gst_pad_push_event (pad, event);
gst_pad_set_caps (pad, caps);
gst_stream_set_caps (bstream->stream_object, caps);
if (!stream->taglist)
stream->taglist = gst_tag_list_new_empty ();
gst_pb_utils_add_codec_description_to_tag_list (stream->taglist, NULL,
caps);
gst_stream_set_tags (bstream->stream_object, stream->taglist);
gst_pad_push_event (pad, event);
gst_pad_set_caps (pad, caps);
gst_pad_set_query_function (pad, gst_ts_demux_srcpad_query);
gst_pad_set_event_function (pad, gst_ts_demux_srcpad_event);
}