projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use proper audio buffer truncation function
[nihav.git]
/
nihav-llaudio
/
src
/
codecs
/
tta.rs
diff --git
a/nihav-llaudio/src/codecs/tta.rs
b/nihav-llaudio/src/codecs/tta.rs
index 03eb515777023657c03dd545b4c7b7d3780e0a5c..e88793eddf508c820a8dd5deff860d9e5c9e15f3 100644
(file)
--- 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 {
if not_last {
self.framelen
} else {
- adata.truncate((self.nsamples % self.framelen) as usize);
self.nsamples % self.framelen
}
},
self.nsamples % self.framelen
}
},
@@
-300,12
+299,12
@@
impl NADecoder for TTADecoder {
if not_last {
self.framelen
} else {
if not_last {
self.framelen
} else {
- adata.truncate((self.nsamples % self.framelen) as usize);
self.nsamples % self.framelen
}
},
_ => unreachable!(),
};
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)));
let mut frm = NAFrame::new_from_pkt(pkt, info, abuf);
frm.set_duration(Some(u64::from(duration)));