diff --git a/examples/mp4dump.rs b/examples/mp4dump.rs index 6a97d9a..597bb70 100644 --- a/examples/mp4dump.rs +++ b/examples/mp4dump.rs @@ -56,7 +56,9 @@ fn get_boxes(file: File) -> Result> { if let Some(mehd) = &mvex.mehd { boxes.push(build_box(mehd)); } - boxes.push(build_box(&mvex.trex)); + for trex in &mvex.trex { + boxes.push(build_box(trex)); + } } // trak. diff --git a/src/mp4box/mvex.rs b/src/mp4box/mvex.rs index 44a4f19..b0afe9a 100644 --- a/src/mp4box/mvex.rs +++ b/src/mp4box/mvex.rs @@ -93,7 +93,7 @@ impl WriteBox<&mut W> for MvexBox { if let Some(mehd) = &self.mehd { mehd.write_box(writer)?; } - for trex in self.trex { + for trex in &self.trex { trex.write_box(writer)?; }