OSDN Git Service

lavf/img2dec: Increase detection score of jpgs without EOI.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 1 Jan 2017 17:59:57 +0000 (18:59 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 1 Jan 2017 17:59:57 +0000 (18:59 +0100)
Also increases the score for large jpeg files.
Fixes autodetection for the file from mpv issue 3973.

libavformat/img2dec.c

index c8d7031..321189f 100644 (file)
@@ -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;
 }