summaryrefslogtreecommitdiff
path: root/gst/mpegdemux
diff options
context:
space:
mode:
authorDoug Nazar <nazard@nazar.ca>2019-08-03 05:21:29 -0400
committerSebastian Dröge <slomo@coaxion.net>2019-08-05 14:32:24 +0000
commit341a8009548348054c9fa4b45d548271636461e2 (patch)
tree0dc088563c4b438f504bd65eedfb974417536417 /gst/mpegdemux
parent40f7001bef1b83e69ea3e9d2a6aa923967d99b27 (diff)
downloadgstreamer-plugins-bad-341a8009548348054c9fa4b45d548271636461e2.tar.gz
mpegdemux: Finish setting up stream before adding pad.
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index cbcfb79d6..8f00918d3 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -536,6 +536,9 @@ gst_ps_demux_get_stream (GstPsDemux * demux, gint id, gint type)
GST_DEBUG_OBJECT (demux, "adding pad for stream id 0x%02x type 0x%02x", id,
type);
+ demux->streams[id] = stream;
+ demux->streams_found[demux->found_count++] = stream;
+
if (demux->need_no_more_pads) {
gst_element_add_pad (GST_ELEMENT (demux), stream->pad);
gst_flow_combiner_add_pad (demux->flowcombiner, stream->pad);
@@ -547,9 +550,6 @@ gst_ps_demux_get_stream (GstPsDemux * demux, gint id, gint type)
"but already signalled no-more-pads; not adding");
gst_object_ref_sink (stream->pad);
}
-
- demux->streams[id] = stream;
- demux->streams_found[demux->found_count++] = stream;
}
return stream;