Commit e2285e7c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mjpegdec: Fix negative shift

Fixes: mjpeg_left_shift.avi
Found-by: 's avatarPiotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d86d7b24)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4c6b48a0
...@@ -975,7 +975,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p ...@@ -975,7 +975,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
return -1; return -1;
left[i] = buffer[mb_x][i] = left[i] = buffer[mb_x][i] =
mask & (pred + (dc << point_transform)); mask & (pred + (dc * (1 << point_transform)));
} }
if (s->restart_interval && !--s->restart_count) { if (s->restart_interval && !--s->restart_count) {
......
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