aac: add missing heading bit to escape value
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 27 Aug 2020 08:51:18 +0000 (10:51 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 27 Aug 2020 08:51:18 +0000 (10:51 +0200)
Reported by Philip Deljanov

nihav-commonfmt/src/codecs/aac.rs

index 5058a44fde17c7cb7118db34eab99bbd0e83b482..e5697b7098a420b3c72557f5fa21a976c4b41ea7 100644 (file)
@@ -882,6 +882,7 @@ fn read_escape(br: &mut BitReader, sign: bool) -> DecoderResult<i16> {
     let prefix                                          = br.read_code(UintCodeType::UnaryOnes)? as u8;
     validate!(prefix < 9);
     let bits                                            = br.read(prefix + 4)? as i16;
+    let bits = bits | (1 << (prefix + 4));
     if sign {
         Ok(bits)
     } else {