From e28b6e04480fc6d2ec9a6a65e84c204c029bd15b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 5 Feb 2021 22:33:32 +0100 Subject: [PATCH] avformat/img2dec: improve xbm probing --- libavformat/img2dec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index dcf07a69bc0..d10ba4ca405 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1033,6 +1033,9 @@ static int pam_probe(const AVProbeData *p) static int xbm_probe(const AVProbeData *p) { + if (!memcmp(p->buf, "/* XBM X10 format */", 20)) + return AVPROBE_SCORE_MAX; + if (!memcmp(p->buf, "#define", 7)) return AVPROBE_SCORE_MAX - 1; return 0; -- 2.39.2