Hi! Attached patch fixes ticket #8846, the sample there is both a mov and an mxf file. It is not entirely clear to me if the sample was only made to annoy us but the content looks real.
An alternative may be to check the extension if the score is equal but I don't really like that either. Other solutions welcome, Carl Eugen
From 4e6ff4465f9d2928b181b5cfc652d45b703a82f4 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Mon, 24 Aug 2020 21:37:00 +0200 Subject: [PATCH] lavf/mxfdec: Limit score for strangely cut files. Only return AVPROBE_SCORE_MAX if the header partition pack key is at the start of the file. Fixes ticket #8846. --- libavformat/mxfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 4b56984b77..14b430a8d4 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -3615,7 +3615,7 @@ static int mxf_probe(const AVProbeData *p) { AV_RN32(bufp+ 4) == AV_RN32(mxf_header_partition_pack_key+ 4) && AV_RN32(bufp+ 8) == AV_RN32(mxf_header_partition_pack_key+ 8) && AV_RN16(bufp+12) == AV_RN16(mxf_header_partition_pack_key+12)) - return AVPROBE_SCORE_MAX; + return bufp - p->buf ? AVPROBE_SCORE_MAX - 1 : AVPROBE_SCORE_MAX; bufp ++; } else bufp += 10; -- 2.24.1
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".