mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-18 07:45:49 +00:00
fix(moov): update box size now that mvex is getting written
This commit is contained in:
parent
6a591766df
commit
68c905d5f8
1 changed files with 5 additions and 6 deletions
|
@ -29,15 +29,14 @@ impl MoovBox {
|
|||
|
||||
pub fn get_size(&self) -> u64 {
|
||||
let mut size = HEADER_SIZE + self.mvhd.box_size();
|
||||
size += self.meta.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||
size += self.mvex.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||
|
||||
for trak in self.traks.iter() {
|
||||
size += trak.box_size();
|
||||
}
|
||||
if let Some(meta) = &self.meta {
|
||||
size += meta.box_size();
|
||||
}
|
||||
if let Some(udta) = &self.udta {
|
||||
size += udta.box_size();
|
||||
}
|
||||
|
||||
size += self.udta.as_ref().map(|x| x.box_size()).unwrap_or(0);
|
||||
size
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue