From 0a7fafefa1fbd432e1a4faf4aad222a3318ed9a0 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 25 Dec 2020 13:48:23 +0100 Subject: [PATCH] ape: fix decoding of large value in 3.91-3.98 --- nihav-llaudio/src/codecs/apereader.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5