aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-28 18:10:23 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-26 21:52:47 +0100
commit0d7343f8ddf69950de5ce53d203f5d3394256dc0 (patch)
tree089e3e06a7183d118148a9a527e1ecb1ab26cd7b
parentfb8676eb1cdd3891b266a1150e52138cf4496cc8 (diff)
downloadffmpeg-0d7343f8ddf69950de5ce53d203f5d3394256dc0.tar.gz
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 c6f4720b8664e6e22eb5b3da6bb48ed5b113f746) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mjpegdec.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 69c9cf3626..bce5496fca 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1381,12 +1381,10 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
return AVERROR_INVALIDDATA;
}
- if (!Al) {
- // s->coefs_finished is a bitmask for coefficients coded
- // ss and se are parameters telling start and end coefficients
- s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss);
- last_scan = !~s->coefs_finished[c];
- }
+ // s->coefs_finished is a bitmask for coefficients coded
+ // ss and se are parameters telling start and end coefficients
+ s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss);
+ last_scan = !Al && !~s->coefs_finished[c];
if (s->interlaced && s->bottom_field)
data += linesize >> 1;