From d5eec0666e2d56c7cc4a3ed9f11e753fd7134673 Mon Sep 17 00:00:00 2001 From: Stuart Woodbury Date: Fri, 14 Jul 2023 10:50:51 -0400 Subject: [PATCH] fix get_size() for trunbox --- src/mp4box/trun.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mp4box/trun.rs b/src/mp4box/trun.rs index efbb2b0..3ca2989 100644 --- a/src/mp4box/trun.rs +++ b/src/mp4box/trun.rs @@ -55,6 +55,11 @@ impl TrunBox { if TrunBox::FLAG_SAMPLE_CTS & self.flags > 0 { sum += 4 * self.sample_count as u64; } + + sum += (4 * self.sample_durations.len()) as u64; + sum += (4 * self.sample_sizes.len()) as u64; + sum += (4 * self.sample_flags.len()) as u64; + sum += (4 * self.sample_cts.len()) as u64; sum } }