aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-10 17:43:56 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-15 16:00:31 +0100
commit3820c6a979cad16ad993580af80b5968b87ea382 (patch)
tree0cf668596b483d39e385bc0c5349f6938e5637ed
parent7cfea0d41cb05f099c2456f7b0797382adda7756 (diff)
downloadffmpeg-3820c6a979cad16ad993580af80b5968b87ea382.tar.gz
avcodec/dvdec: Fix "left shift of negative value -254"
Fixes: dvdec_left_shift.avi Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 93ac72a98dff592ffc174cfb36a8975dfbf145ae) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index fbd6bf504b..0f9edf0dae 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -333,7 +333,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
dct_mode * 22 * 64 +
(quant + ff_dv_quant_offset[class1]) * 64];
}
- dc = dc << 2;
+ dc = dc * 4;
/* convert to unsigned because 128 is not added in the
* standard IDCT */
dc += 1024;