[FFmpeg-devel] [PATCH]lavf/img2dec: Skip SOS when auto-detecting jpeg

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Feb 29 01:45:28 CET 2016


Hi!

I believe attached patch fixes a possible issue when auto-detecting jpeg.

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 28a1fdb..94cce93 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;


More information about the ffmpeg-devel mailing list