[FFmpeg-cvslog] avcodec/dvdec: Fix "left shift of negative value -254"

Michael Niedermayer git at videolan.org
Fri Jan 15 17:39:20 CET 2016


ffmpeg | branch: release/2.6 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 10 17:43:56 2016 +0100| [526b5facc59e5d45aac5b3832a04b3af28f038b0] | committer: Michael Niedermayer

avcodec/dvdec: Fix "left shift of negative value -254"

Fixes: dvdec_left_shift.avi

Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 93ac72a98dff592ffc174cfb36a8975dfbf145ae)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=526b5facc59e5d45aac5b3832a04b3af28f038b0
---

 libavcodec/dvdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 388bbf2..2a4a18d 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;



More information about the ffmpeg-cvslog mailing list