From 375a22a472fd895632e2d4bc5a876100af0099aa Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 1 Jan 2017 18:59:57 +0100 Subject: [PATCH] lavf/img2dec: Increase detection score of jpgs without EOI. Also increases the score for large jpeg files. Fixes autodetection for the file from mpv issue 3973. --- libavformat/img2dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index c8d70314f6..321189f38f 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -755,6 +755,8 @@ static int jpeg_probe(AVProbeData *p) if (state == EOI) return AVPROBE_SCORE_EXTENSION + 1; + if (state == SOS) + return AVPROBE_SCORE_EXTENSION / 2 + 1; return AVPROBE_SCORE_EXTENSION / 8; }