diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-07-03 11:48:13 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-07-04 09:24:54 +0200 |
commit | cbbd330abc95d31ec3e67c6811333db015f54c01 (patch) | |
tree | f1a82088801f5e9dc63d5ec0dcca195229749718 /libavcodec/alsdec.c | |
parent | c3f10ea4bb0429a18e38f9c87b55a13fa64ab087 (diff) | |
download | ffmpeg-cbbd330abc95d31ec3e67c6811333db015f54c01.tar.gz |
avcodec/alsdec: fix some undefined shifts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r-- | libavcodec/alsdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 960c55c653..13bd52f297 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -761,7 +761,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) } for (k = 2; k < opt_order; k++) - quant_cof[k] = (quant_cof[k] << 14) + (add_base << 13); + quant_cof[k] = (quant_cof[k] * (1 << 14)) + (add_base << 13); } } @@ -866,7 +866,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) res >>= 1; if (cur_k) { - res <<= cur_k; + res *= 1 << cur_k; res |= get_bits_long(gb, cur_k); } } |