mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 06:02:32 +00:00
mp4: Match on all parse modes
This commit is contained in:
parent
d73fd81e9e
commit
f0953a6e78
1 changed files with 8 additions and 5 deletions
|
@ -144,12 +144,15 @@ impl AtomInfo {
|
|||
// Seek to the end, since we can't recover from this
|
||||
data.seek(SeekFrom::End(0))?;
|
||||
|
||||
if parse_mode == ParsingMode::Strict {
|
||||
err!(BadAtom("Encountered an atom with invalid characters"));
|
||||
match parse_mode {
|
||||
ParsingMode::Strict => {
|
||||
err!(BadAtom("Encountered an atom with invalid characters"));
|
||||
},
|
||||
ParsingMode::BestAttempt | ParsingMode::Relaxed => {
|
||||
log::warn!("Encountered an atom with invalid characters, stopping");
|
||||
return Ok(None);
|
||||
},
|
||||
}
|
||||
|
||||
log::warn!("Encountered an atom with invalid characters, stopping");
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let (len, extended) = match len_raw {
|
||||
|
|
Loading…
Reference in a new issue