mirror of
https://github.com/alfg/mp4-rust.git
synced 2024-06-02 13:39:54 +00:00
Skip over unknown boxes
If the box size is non-zero, skip over it and continue reading. Otherwise if the box size is zero, exit the loop.
This commit is contained in:
parent
f04ebb4b61
commit
feb83e6452
|
@ -83,7 +83,13 @@ fn read_boxes(f: File) -> Result<BMFF> {
|
|||
BoxType::MoofBox => {
|
||||
start = (size as u32 - HEADER_SIZE) as u64;
|
||||
}
|
||||
_ => break
|
||||
_ => {
|
||||
if size == 0 {
|
||||
break;
|
||||
} else {
|
||||
start = (size as u32 - HEADER_SIZE) as u64;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Ok(bmff)
|
||||
|
|
Loading…
Reference in a new issue