summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 04:24:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 04:24:57 +0100
commit1932f7e2eee07e4a50e014a625dca79a9f9dba7a (patch)
tree534321700377a4f0796cf1b4e89a4ae66de6feae /libavcodec/mpeg12dec.c
parent2e5605f6fa0a2a633afaa096bd60befb5e4ab431 (diff)
avcodec/mpeg12dec: Fix undefined shift
Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index f7e57f934d..a5622bf19e 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);
}