summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlicia Boya GarcĂ­a <aboya@igalia.com>2018-09-21 22:24:02 +0200
committerThibault Saunier <tsaunier@igalia.com>2018-09-22 11:11:41 -0300
commitc979276a2b3aa85e64e0338a2dcd8b2e5846f80c (patch)
treecf96799dfda11865cf6ebf27da4018ee648629a7
parentc59ba3a0e18b12e32bc52d5f758b99a48df4380e (diff)
matroskademux: Emit no-more-pads after parsing Tracks
Currently matroskademux does not emit no-more-pads until the first Cluster is parsed, even though the Tracks have already been parsed and from that point on there can be no more tracks. This is important in MSE because the browser needs to know when the MSE initialization segment has been completely parsed so that it can expose the tracks to the user. Some applications depend on this been done before they feed frames to the demuxer. As a consequence, historically WebKit has relied on hacks such as listening to the `pad-added` event, which made impossible to support multiple tracks in the same file. Let's fix that. https://bugzilla.gnome.org/show_bug.cgi?id=797187
-rw-r--r--gst/matroska/matroska-demux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 08e5a606a2..1b95451fb4 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -2811,6 +2811,8 @@ gst_matroska_demux_parse_tracks (GstMatroskaDemux * demux, GstEbmlRead * ebml)
DEBUG_ELEMENT_STOP (demux, ebml, "Tracks", ret);
demux->tracks_parsed = TRUE;
+ GST_DEBUG_OBJECT (demux, "signaling no more pads");
+ gst_element_no_more_pads (GST_ELEMENT (demux));
return ret;
}
@@ -4855,8 +4857,7 @@ gst_matroska_demux_parse_id (GstMatroskaDemux * demux, guint32 id,
GST_TIME_ARGS (demux->common.segment.duration));
}
}
- GST_DEBUG_OBJECT (demux, "signaling no more pads");
- gst_element_no_more_pads (GST_ELEMENT (demux));
+
/* send initial segment - we wait till we know the first
incoming timestamp, so we can properly set the start of
the segment. */