aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2023-12-21 16:12:57 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2023-12-21 16:12:57 +0100
commit769b447349aa83a606b6e8ccd8c8b7f13eb2f63c (patch)
tree576eecb704cf6838ade378d70359db7597f64cb0
parent2d94f690936af4c2279b1e284ea7cb93ffe71717 (diff)
downloadnihav-769b447349aa83a606b6e8ccd8c8b7f13eb2f63c.tar.gz
ms-adpcm: fix decoding
-rw-r--r--nihav-ms/src/codecs/msadpcm.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/nihav-ms/src/codecs/msadpcm.rs b/nihav-ms/src/codecs/msadpcm.rs
index 23769de..f95a691 100644
--- a/nihav-ms/src/codecs/msadpcm.rs
+++ b/nihav-ms/src/codecs/msadpcm.rs
@@ -124,11 +124,11 @@ impl NADecoder for MSADPCMDecoder {
}
for ch in 0..channels {
let samp = br.read_u16le()? as i16;
- pred[ch].sample2 = i32::from(samp);
+ pred[ch].sample1 = i32::from(samp);
}
for ch in 0..channels {
let samp = br.read_u16le()? as i16;
- pred[ch].sample1 = i32::from(samp);
+ pred[ch].sample2 = i32::from(samp);
}
for ch in 0..channels {
dst[off[ch]] = pred[ch].sample2 as i16;
@@ -433,7 +433,7 @@ mod test {
ms_register_all_decoders(&mut dec_reg);
test_decoding("avi", "ms-adpcm", "assets/MS/dance.avi", None, &dmx_reg, &dec_reg,
- ExpectedTestResult::MD5([0xf5e3fc84, 0xbcabc11c, 0x33c6874e, 0xe05ecd14]));
+ ExpectedTestResult::MD5([0xb1d6f12c, 0x86d2821b, 0x395f6827, 0xb6be93bf]));
}
#[cfg(feature="encoder_ms_adpcm")]
#[test]