From: Kostya Shishkov Date: Mon, 18 Aug 2025 16:31:36 +0000 (+0200) Subject: nihav_mpeg: switch to ByteIO X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=fd2c4eb5d5d2152acd3e894d15fd1544468c7940;p=nihav.git nihav_mpeg: switch to ByteIO --- diff --git a/nihav-mpeg/src/codecs/aac/mod.rs b/nihav-mpeg/src/codecs/aac/mod.rs index d0588e3..5adbc07 100644 --- a/nihav-mpeg/src/codecs/aac/mod.rs +++ b/nihav-mpeg/src/codecs/aac/mod.rs @@ -681,8 +681,7 @@ impl NADecoder for AACDecoder { validate!(edata.len() >= 2); if (edata.len() > 12) && (&edata[4..8] == b"esds") { - let mut mr = MemoryReader::new_read(edata.as_slice()); - let mut br = ByteReader::new(&mut mr); + let mut br = MemoryReader::new_read(edata.as_slice()); let esds_size = br.read_u32be()? as usize; validate!(esds_size <= edata.len()); br.read_skip(8)?; diff --git a/nihav-mpeg/src/codecs/mpeg4asp/bitstream.rs b/nihav-mpeg/src/codecs/mpeg4asp/bitstream.rs index ac3f79b..8d91973 100644 --- a/nihav-mpeg/src/codecs/mpeg4asp/bitstream.rs +++ b/nihav-mpeg/src/codecs/mpeg4asp/bitstream.rs @@ -33,8 +33,7 @@ impl<'a> ReadMarkerBit for BitReader<'a> { } pub fn scan_start_codes(src: &[u8]) -> DecoderResult> { - let mut mr = MemoryReader::new_read(src); - let mut br = ByteReader::new(&mut mr); + let mut br = MemoryReader::new_read(src); let mut offs = Vec::new(); let mut pfx = br.read_u32be()?;