avformat/mov: add interleaved_read option

For badly interleaved files, interleave packets from multiple tracks
at the demuxer level can trigger seeking back and forth, which can be
dramatically slow depending on the protocol. Demuxer level interleave
can be useless sometimes, e.g., reading mp4 via http and then
transcoding/remux to DASH. Disable this option when you don't need the
demuxer level interleave, and want to avoid the IO penalizes.

Co-authored-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili
2023-09-12 01:03:58 +08:00
parent 6434e44003
commit a8d9da4c8b
4 changed files with 13 additions and 2 deletions

View File

@@ -327,6 +327,7 @@ typedef struct MOVContext {
int64_t extent_offset;
} *avif_info;
int avif_info_size;
int interleaved_read;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);