From 8a0f4e74e445e4dcb37bcff93358b0d0f3daf0aa Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Fri, 15 Aug 2014 14:58:26 +0200 Subject: qtdemux: stop parsing headers for fragmented mp4s at the first moof Currently during header parsing, we scan through the entire file and skip every moof+mdat chunk for fragmented mp4s, which makes start-up incredibly slow. Instead, just stop at the first moof chunk when have a moov, and start exposing the streams, so we can go and start handling the moofs for real. --- gst/isomp4/qtdemux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index b7b4a07f9..1db4a3114 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -3106,7 +3106,12 @@ gst_qtdemux_loop_state_header (GstQTDemux * qtdemux) if (!qtdemux->moof_offset) { qtdemux->moof_offset = qtdemux->offset; } - /* fall-through */ + if (qtdemux->got_moov) { + GST_INFO_OBJECT (qtdemux, "moof header, got moov, done with headers"); + ret = GST_FLOW_EOS; + goto beach; + } + break; case FOURCC_mdat: case FOURCC_free: case FOURCC_wide: -- cgit v1.2.3