Hi! For large jpeg files, EOI may never be seen by the probe function but several jpeg tags are correctly identified.
Please comment, Carl Eugen
From 1abe53bf7826b23f5aca7b5b6108e6d309b21b86 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceho...@ag.or.at> Date: Sun, 1 Jan 2017 14:35:21 +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 c8d7031..8967630 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 - 1; return AVPROBE_SCORE_EXTENSION / 8; } -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel