let ctype = br.read_byte()?;
let csize = br.read_u24be()?;
match ctype {
- 0x20 | 0x21 | 0x22 | 0x23 => {
+ 0x20..=0x23 => {
mode = DecodeMode::YUV;
break;
},
- 0x24 | 0x25 | 0x26 | 0x27 => {
+ 0x24..=0x27 => {
mode = DecodeMode::Gray;
break;
},
self.frmmgr.clear();
let edata = info.get_extradata().unwrap_or(std::sync::Arc::new(vec![]));
//todo detect simply by extradata contents?
- if edata.len() == 0 || edata.len() < 0x60 { // no or short extradata probably comes from MOV
+ if edata.is_empty() || edata.len() < 0x60 { // no or short extradata probably comes from MOV
self.tsize = 4;
} else if !self.is_rm {
let mut br = MemoryReader::new_read(edata.as_slice());
}
} else if let Some(ref stream) = track.stream {
if let Some(desc) = get_codec_description(stream.get_info().get_name()) {
- if (desc.caps & CODEC_CAP_INTRAONLY) != 0 && track.chunk_sizes.len() > 0 {
+ if (desc.caps & CODEC_CAP_INTRAONLY) != 0 && !track.chunk_sizes.is_empty() {
for samp in 0..track.chunk_sizes.len() {
track.keyframes.push((samp + 1) as u32);
}
if (flags & 0x000020) != 0 {
let _default_sample_flags = br.read_u32be()?;
}
- if (flags & 0x010000) != 0 {
- }
+ /*if (flags & 0x010000) != 0 { // duration is empty
+ }*/
/*if (flags & 0x020000) != 0 { // base offset is moof start
}*/
Ok(br.tell() - start)