projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
duck: fix some clippy warnings
[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 d7b777f78219d08ecc55893a2b0dc7e31bb5084c..ba2ff17f8154090e86c476af4569015f0e20b94a 100644
(file)
--- a/
nihav-duck/src/codecs/truemotionrt.rs
+++ b/
nihav-duck/src/codecs/truemotionrt.rs
@@
-60,9
+60,7
@@
impl NADecoder for TMRTDecoder {
let height = (hdr[5] as usize) | ((hdr[6] as usize) << 8);
let myinfo = NAVideoInfo::new(width, height, false, YUV410_FORMAT);
let height = (hdr[5] as usize) | ((hdr[6] as usize) << 8);
let myinfo = NAVideoInfo::new(width, height, false, YUV410_FORMAT);
- let bufret = alloc_video_buffer(myinfo, 2);
- if let Err(_) = bufret { return Err(DecoderError::InvalidData); }
- let bufinfo = bufret.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 buf = bufinfo.get_vbuf().unwrap();
let mut br = BitReader::new(&src[hdr_size..], src.len() - hdr_size, BitReaderMode::LE);