diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-10-29 14:49:09 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-10-29 14:49:09 +0200 |
commit | 2d1e0773a5c845db33041796ea74d8ca12710ced (patch) | |
tree | 33aafcf4f4c706395fa8e6955d2816f97dcaf89e /nihav-llaudio/src/codecs | |
parent | b191eef3e3e1b6bea510c7e64606d8442f974f8b (diff) | |
download | nihav-2d1e0773a5c845db33041796ea74d8ca12710ced.tar.gz |
use proper audio buffer truncation function
Diffstat (limited to 'nihav-llaudio/src/codecs')
-rw-r--r-- | nihav-llaudio/src/codecs/tta.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nihav-llaudio/src/codecs/tta.rs b/nihav-llaudio/src/codecs/tta.rs index 03eb515..e88793e 100644 --- a/nihav-llaudio/src/codecs/tta.rs +++ b/nihav-llaudio/src/codecs/tta.rs @@ -289,7 +289,6 @@ impl NADecoder for TTADecoder { if not_last { self.framelen } else { - adata.truncate((self.nsamples % self.framelen) as usize); self.nsamples % self.framelen } }, @@ -300,12 +299,12 @@ impl NADecoder for TTADecoder { if not_last { self.framelen } else { - adata.truncate((self.nsamples % self.framelen) as usize); self.nsamples % self.framelen } }, _ => unreachable!(), }; + abuf.truncate_audio(duration as usize); let mut frm = NAFrame::new_from_pkt(pkt, info, abuf); frm.set_duration(Some(u64::from(duration))); |