[FFmpeg-devel] [PATCH]lavf/img2dec: Skip SOF size when probing jpeg

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Feb 25 23:27:21 CET 2016


Hi!

Attached patch fixes the sample Clément kindly provided:
http://lucy.pkh.me/samples/img.jpg?foo=bar

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index a755b6f..ce40aa5 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -706,6 +706,7 @@ static int jpeg_probe(AVProbeData *p)
         case 0xC1:
         case 0xC2:
         case 0xC3:
+            i += AV_RB16(&b[i + 2]) + 1;
         case 0xC5:
         case 0xC6:
         case 0xC7:


More information about the ffmpeg-devel mailing list