1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avcodec/mjpegdec: Fix decoding slightly odd progressive jpeg

Fixes: ebd58db6-dc86-11e5-91c2-59daeddf50c7.jpg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c6f4720b86)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-02-28 18:10:23 +01:00
parent fb8676eb1c
commit 0d7343f8dd

View File

@ -1381,12 +1381,10 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (!Al) { // s->coefs_finished is a bitmask for coefficients coded
// s->coefs_finished is a bitmask for coefficients coded // ss and se are parameters telling start and end coefficients
// ss and se are parameters telling start and end coefficients s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss);
s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss); last_scan = !Al && !~s->coefs_finished[c];
last_scan = !~s->coefs_finished[c];
}
if (s->interlaced && s->bottom_field) if (s->interlaced && s->bottom_field)
data += linesize >> 1; data += linesize >> 1;