aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-10 15:52:09 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-15 17:39:04 +0100
commite2285e7cc83f0429acabd09d6fc94a84d1763265 (patch)
treef4722d0b1c7b5f83e222809480642d965542080b /libavcodec
parent4c6b48a08e5a975fba644e7eafa1ce5ee35ac618 (diff)
downloadffmpeg-e2285e7cc83f0429acabd09d6fc94a84d1763265.tar.gz
avcodec/mjpegdec: Fix negative shift
Fixes: mjpeg_left_shift.avi Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit d86d7b2486cd5c31db8e820d8a89554abf19567e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 67db2bbd14..439365f7ef 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -975,7 +975,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
return -1;
left[i] = buffer[mb_x][i] =
- mask & (pred + (dc << point_transform));
+ mask & (pred + (dc * (1 << point_transform)));
}
if (s->restart_interval && !--s->restart_count) {