mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-08 19:15:25 +00:00
fix(reader): didn't compile
This commit is contained in:
parent
4b88f0459e
commit
4d676b9da2
1 changed files with 6 additions and 1 deletions
|
@ -97,7 +97,12 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
|||
let mut default_sample_duration = 0;
|
||||
if let Some(ref moov) = moov {
|
||||
if let Some(ref mvex) = &moov.mvex {
|
||||
default_sample_duration = mvex.trex.default_sample_duration
|
||||
// todo: do this better. matches the original behavior before mvex.trex was changed to an array.
|
||||
default_sample_duration = mvex
|
||||
.trex
|
||||
.first()
|
||||
.map(|x| x.default_sample_duration)
|
||||
.unwrap_or(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue