diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2014-08-15 14:58:26 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-11-30 15:30:04 +0000 |
commit | 8a0f4e74e445e4dcb37bcff93358b0d0f3daf0aa (patch) | |
tree | 1a062cc857ec956214dcd0b1642341336562d9ba | |
parent | 75917de294e992deed576fcdefa5d30eccbcce59 (diff) |
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.
-rw-r--r-- | gst/isomp4/qtdemux.c | 7 |
1 files changed, 6 insertions, 1 deletions
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: |