diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 45c49518f2..32eb2d46bf 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -129,7 +129,7 @@ static av_always_inline unsigned get_tail(GetBitContext *gb, int k) e = (1 << (p + 1)) - k - 1; res = get_bitsz(gb, p); if (res >= e) - res = (res << 1) - e + get_bits1(gb); + res = res * 2U - e + get_bits1(gb); return res; }