From 046aad8c1b5339420bde98e1c8590776f02d371e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 24 Jan 2017 23:10:19 +0200 Subject: [PATCH] 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. --- gst/mpegtsdemux/tsdemux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index de4a0e9c23..20357a87f2 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -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); }