diff --git a/src/mp4box/traf.rs b/src/mp4box/traf.rs index 51f812d..95e6f6e 100644 --- a/src/mp4box/traf.rs +++ b/src/mp4box/traf.rs @@ -104,6 +104,12 @@ impl WriteBox<&mut W> for TrafBox { BoxHeader::new(self.box_type(), size).write(writer)?; self.tfhd.write_box(writer)?; + if let Some(ref tfdt) = self.tfdt { + tfdt.write_box(writer)?; + } + if let Some(ref trun) = self.trun { + trun.write_box(writer)?; + } Ok(size) }