projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make BitReader rely on passed slice size without the additional arguments.
[nihav.git]
/
nihav-duck
/
src
/
codecs
/
truemotionrt.rs
diff --git
a/nihav-duck/src/codecs/truemotionrt.rs
b/nihav-duck/src/codecs/truemotionrt.rs
index 1aa8a29943a6ec6d5ff49229ce88ec01e3273cf5..2ea7a1b3459ccf7fbe1bcd3841cfdfb4aacfb0ac 100644
(file)
--- a/
nihav-duck/src/codecs/truemotionrt.rs
+++ b/
nihav-duck/src/codecs/truemotionrt.rs
@@
-63,7
+63,7
@@
impl NADecoder for TMRTDecoder {
let bufinfo = alloc_video_buffer(myinfo, 2)?;
let mut buf = bufinfo.get_vbuf().unwrap();
let bufinfo = alloc_video_buffer(myinfo, 2)?;
let mut buf = bufinfo.get_vbuf().unwrap();
- let mut br = BitReader::new(&src[hdr_size..],
src.len() - hdr_size,
BitReaderMode::LE);
+ let mut br = BitReader::new(&src[hdr_size..], BitReaderMode::LE);
let size = br.read(32)? as usize;
validate!(size <= src.len() - hdr_size);
for plane in 0..3 {
let size = br.read(32)? as usize;
validate!(size <= src.len() - hdr_size);
for plane in 0..3 {