[FFmpeg-cvslog] avformat/mxfdec: disallow generic seek search
Marton Balint
git at videolan.org
Tue Sep 3 00:17:43 EEST 2024
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Tue Aug 27 01:08:33 2024 +0200| [90f68f7b2d2c215e98cea1d955fb37605ae89585] | committer: Marton Balint
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 at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90f68f7b2d2c215e98cea1d955fb37605ae89585
---
libavformat/mxfdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
More information about the ffmpeg-cvslog
mailing list