From fca30832828af70f13de81c11f5346525c9f4b91 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 27 Jan 2017 08:31:07 +0100 Subject: [PATCH] lavf/img2dec: Reduce the probe score for incomplete jpgs. Ensures that probing doesn't finish prematurely for small files. --- libavformat/img2dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 321189f38f..c3c2cf3640 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -756,7 +756,7 @@ 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 / 2; return AVPROBE_SCORE_EXTENSION / 8; }