aboutsummaryrefslogtreecommitdiffstats
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 12:30:40 +0100
commit34e06ce309c9621b35be6d5100caab05525c76b7 (patch)
treebfe443117e458de45c8d6fa44c4d237fa7e0fb5d
parentdf4ee166f1a3a9b52a9df3b3720b056430619fc5 (diff)
downloadffmpeg-34e06ce309c9621b35be6d5100caab05525c76b7.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>
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6d674b6777..ba779949a0 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -999,7 +999,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) {