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.
This commit is contained in:
Tim-Philipp Müller 2014-08-15 14:58:26 +02:00
parent 75917de294
commit 8a0f4e74e4

View file

@ -3106,7 +3106,12 @@ gst_qtdemux_loop_state_header (GstQTDemux * qtdemux)
if (!qtdemux->moof_offset) { if (!qtdemux->moof_offset) {
qtdemux->moof_offset = qtdemux->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_mdat:
case FOURCC_free: case FOURCC_free:
case FOURCC_wide: case FOURCC_wide: