[FFmpeg-cvslog] avcodec/mpeg12dec: Fix undefined shift
Michael Niedermayer
git at videolan.org
Wed Mar 11 04:53:17 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 11 04:24:57 2015 +0100| [1932f7e2eee07e4a50e014a625dca79a9f9dba7a] | committer: Michael Niedermayer
avcodec/mpeg12dec: Fix undefined shift
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu at google.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1932f7e2eee07e4a50e014a625dca79a9f9dba7a
---
libavcodec/mpeg12dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index f7e57f9..a5622bf 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -957,7 +957,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
av_dlog(s->avctx, "fmx=%d\n", val);
val = mpeg_decode_motion(s, s->mpeg_f_code[i][1],
s->last_mv[i][j][1] >> 1);
- s->last_mv[i][j][1] = val << 1;
+ s->last_mv[i][j][1] = 2 * val;
s->mv[i][j][1] = val;
av_dlog(s->avctx, "fmy=%d\n", val);
}
More information about the ffmpeg-cvslog
mailing list