Commit c0ecc597 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/img2dec: Skip SOS when auto-detecting jpeg.

Improves jpeg auto-detection.
parent 98084adc
...@@ -715,6 +715,7 @@ static int jpeg_probe(AVProbeData *p) ...@@ -715,6 +715,7 @@ static int jpeg_probe(AVProbeData *p)
state = 0xC0; state = 0xC0;
break; break;
case 0xDA: case 0xDA:
i += AV_RB16(&b[i + 2]) + 1;
if (state != 0xC0 && state != 0xDA) if (state != 0xC0 && state != 0xDA)
return 0; return 0;
state = 0xDA; state = 0xDA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment