diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2020-08-24 21:37:00 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2020-08-25 01:05:51 +0200 |
commit | 3092a53cbc48252d29007177205f599c9c6f8769 (patch) | |
tree | eca272872a67e71eda904e894bde5c024708d1d6 /libavformat/mxfdec.c | |
parent | d6f293353c94c7ce200f6e0975ae3de49787f91f (diff) | |
download | ffmpeg-3092a53cbc48252d29007177205f599c9c6f8769.tar.gz |
lavf/mxfdec: Limit score for files with run-in.
Only return AVPROBE_SCORE_MAX if the header partition pack key
is at the start of the file.
Fixes ticket #8846.
Reviewed-by: Tomas Härdin
Diffstat (limited to 'libavformat/mxfdec.c')
-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 4b56984b77..3a090147a0 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 : AVPROBE_SCORE_MAX - 1; bufp ++; } else bufp += 10; |