From: Kostya Shishkov Date: Fri, 25 Dec 2020 12:48:23 +0000 (+0100) Subject: ape: fix decoding of large value in 3.91-3.98 X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=0a7fafefa1fbd432e1a4faf4aad222a3318ed9a0;p=nihav.git ape: fix decoding of large value in 3.91-3.98 --- diff --git a/nihav-llaudio/src/codecs/apereader.rs b/nihav-llaudio/src/codecs/apereader.rs index acd602b..c1681a4 100644 --- a/nihav-llaudio/src/codecs/apereader.rs +++ b/nihav-llaudio/src/codecs/apereader.rs @@ -360,9 +360,9 @@ fn decode_value_3910(rc: &mut ARangeCoder, rice: &mut RiceParams) -> i32 { let base = if k <= 16 { rc.decode_bits(k) } else if k <= 32 { - let low = rc.decode_bits(k); + let low = rc.decode_bits(16); let high = rc.decode_bits(k - 16); - (high << (k - 16)) | low + (high << 16) | low } else { rc.error = true; return 0;