mp4: Match on all parse modes

This commit is contained in:
Uwe Klotz 2023-10-16 18:47:33 +02:00 committed by Alex
parent d73fd81e9e
commit f0953a6e78

View file

@ -144,12 +144,15 @@ impl AtomInfo {
// Seek to the end, since we can't recover from this // Seek to the end, since we can't recover from this
data.seek(SeekFrom::End(0))?; data.seek(SeekFrom::End(0))?;
if parse_mode == ParsingMode::Strict { match parse_mode {
ParsingMode::Strict => {
err!(BadAtom("Encountered an atom with invalid characters")); err!(BadAtom("Encountered an atom with invalid characters"));
} },
ParsingMode::BestAttempt | ParsingMode::Relaxed => {
log::warn!("Encountered an atom with invalid characters, stopping"); log::warn!("Encountered an atom with invalid characters, stopping");
return Ok(None); return Ok(None);
},
}
} }
let (len, extended) = match len_raw { let (len, extended) = match len_raw {