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)?;
}
pub fn scan_start_codes(src: &[u8]) -> DecoderResult<Vec<usize>> {
- 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()?;