mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-09 03:25:25 +00:00
fix(reader): return Err instead of panic
This commit is contained in:
parent
3e23adae7f
commit
ff9e75922b
1 changed files with 2 additions and 2 deletions
|
@ -116,8 +116,8 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
||||||
|
|
||||||
Ok(Mp4Reader {
|
Ok(Mp4Reader {
|
||||||
reader,
|
reader,
|
||||||
ftyp: ftyp.unwrap(),
|
ftyp: ftyp.ok_or(crate::error::Error::BoxNotFound(BoxType::FtypBox))?,
|
||||||
moov: moov.unwrap(),
|
moov: moov.ok_or(crate::error::Error::BoxNotFound(BoxType::MoovBox))?,
|
||||||
moofs,
|
moofs,
|
||||||
emsgs,
|
emsgs,
|
||||||
size,
|
size,
|
||||||
|
|
Loading…
Reference in a new issue