mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-18 15:55:24 +00:00
fix(traf): box size didn't include tfdt
This commit is contained in:
parent
8ce513414c
commit
23b8c86eec
1 changed files with 2 additions and 3 deletions
|
@ -19,9 +19,8 @@ impl TrafBox {
|
|||
pub fn get_size(&self) -> u64 {
|
||||
let mut size = HEADER_SIZE;
|
||||
size += self.tfhd.box_size();
|
||||
if let Some(ref trun) = self.trun {
|
||||
size += trun.box_size();
|
||||
}
|
||||
size += self.tfdt.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||
size += self.trun.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||
size
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue