diff options
author | Marton Balint <cus@passwd.hu> | 2024-08-27 01:08:33 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2024-09-02 22:50:52 +0200 |
commit | 90f68f7b2d2c215e98cea1d955fb37605ae89585 (patch) | |
tree | 0f65e98662c65b51e8e4107fcf5a98d5d780efd4 | |
parent | 24eff5b54793faa77502fec5812520f6794da2b6 (diff) | |
download | ffmpeg-90f68f7b2d2c215e98cea1d955fb37605ae89585.tar.gz |
avformat/mxfdec: disallow generic seek search
If the demuxer does not provide per-stream indexes, the generic seek search can
attempt to read the whole media file from the beginning when seeking. For large
MXF files this can cause huge lockups for a seek after the last timestamp,
which will eventually fail. So let's disable the generic seek for mxf, the
demuxer's own seek code should handle seeking just fine.
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | libavformat/mxfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index af0c8a3100..ac63c0d5ad 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -4274,7 +4274,7 @@ static const AVClass demuxer_class = { const FFInputFormat ff_mxf_demuxer = { .p.name = "mxf", .p.long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format)"), - .p.flags = AVFMT_SEEK_TO_PTS, + .p.flags = AVFMT_SEEK_TO_PTS | AVFMT_NOGENSEARCH, .p.priv_class = &demuxer_class, .priv_data_size = sizeof(MXFContext), .flags_internal = FF_INFMT_FLAG_INIT_CLEANUP, |