diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-01-24 20:52:44 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-01-24 20:54:12 +0300 |
commit | ee8249eec76da88d5797f16d617feaf53fe2037e (patch) | |
tree | e413476e4bb20be095d9dcb0dc969e2d7d5522f0 /mux | |
parent | 1ceaea844a7442a235726ab8a7a93f75aa58b609 (diff) |
fmp4mux: Don't write the first sample flags into any trun but the first
The flags are based on the first sample of this fragment so writing it
into any trun but the first is not very useful.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1060>
Diffstat (limited to 'mux')
-rw-r--r-- | mux/fmp4/src/fmp4mux/boxes.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mux/fmp4/src/fmp4mux/boxes.rs b/mux/fmp4/src/fmp4mux/boxes.rs index 012e66df0..55ada48b3 100644 --- a/mux/fmp4/src/fmp4mux/boxes.rs +++ b/mux/fmp4/src/fmp4mux/boxes.rs @@ -1839,7 +1839,7 @@ fn write_traf( // has to be stored for every single sample let ( tf_flags, - tr_flags, + mut tr_flags, default_size, default_duration, default_flags, @@ -1895,6 +1895,9 @@ fn write_traf( current_data_offset = (current_data_offset as u64 + run.iter().map(|b| b.buffer.size() as u64).sum::<u64>()) .try_into()?; + + // Don't include first sample flags in any trun boxes except for the first + tr_flags &= !FIRST_SAMPLE_FLAGS_PRESENT; } // TODO: saio, saiz, sbgp, sgpd, subs? |