alfg / mp4-rust

MP4 reader + writer library in Rust! 🎥🦀
https://crates.io/crates/mp4
MIT License
278 stars 75 forks source link

Support multiple `trun` boxes in a single `traf` box #135

Closed jerzywilczek closed 6 months ago

jerzywilczek commented 7 months ago

MPEG-4 part 12 section 8.8.8 states that a traf box may contain multiple trun boxes. This patch allows parsing such files correctly. Previously, the library would only parse the last trun box for each traf box, which caused the tracks to be unplayable.

jerzywilczek commented 6 months ago

Closing, since upon further inspection I am no longer sure that my changes are entirely correct.