1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2025-01-07 02:35:26 +00:00

fix(reader): return Err instead of panic

This commit is contained in:
Stuart Woodbury 2023-07-05 10:02:42 -04:00
parent 3e23adae7f
commit ff9e75922b

View file

@ -116,8 +116,8 @@ impl<R: Read + Seek> Mp4Reader<R> {
Ok(Mp4Reader {
reader,
ftyp: ftyp.unwrap(),
moov: moov.unwrap(),
ftyp: ftyp.ok_or(crate::error::Error::BoxNotFound(BoxType::FtypBox))?,
moov: moov.ok_or(crate::error::Error::BoxNotFound(BoxType::MoovBox))?,
moofs,
emsgs,
size,