mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-31 05:38:26 +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 {
|
pub fn get_size(&self) -> u64 {
|
||||||
let mut size = HEADER_SIZE;
|
let mut size = HEADER_SIZE;
|
||||||
size += self.tfhd.box_size();
|
size += self.tfhd.box_size();
|
||||||
if let Some(ref trun) = self.trun {
|
size += self.tfdt.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||||
size += trun.box_size();
|
size += self.trun.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||||
}
|
|
||||||
size
|
size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue