mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-14 06:32:33 +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
|
// 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 {
|
||||||
err!(BadAtom("Encountered an atom with invalid characters"));
|
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 {
|
let (len, extended) = match len_raw {
|
||||||
|
|
Loading…
Reference in a new issue