mirror of
https://github.com/alfg/mp4-rust.git
synced 2024-06-02 13:39:54 +00:00
fix(reader): didn't compile
This commit is contained in:
parent
4b88f0459e
commit
4d676b9da2
|
@ -97,7 +97,12 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
||||||
let mut default_sample_duration = 0;
|
let mut default_sample_duration = 0;
|
||||||
if let Some(ref moov) = moov {
|
if let Some(ref moov) = moov {
|
||||||
if let Some(ref mvex) = &moov.mvex {
|
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