From c0ecc597fa966afef8703be72a0689f6074a858d Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 29 Feb 2016 11:58:16 +0100 Subject: lavf/img2dec: Skip SOS when auto-detecting jpeg. Improves jpeg auto-detection. --- libavformat/img2dec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 28a1fdbfcc..94cce93e11 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -715,6 +715,7 @@ static int jpeg_probe(AVProbeData *p) state = 0xC0; break; case 0xDA: + i += AV_RB16(&b[i + 2]) + 1; if (state != 0xC0 && state != 0xDA) return 0; state = 0xDA; -- cgit v1.2.3