fmp4mux: Add explanatory comment why tfdt is mapped to the earliest PTS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2232>
This commit is contained in:
Sebastian Dröge 2025-05-05 16:46:51 +03:00
parent a9a3a7a435
commit 8f8a663555

View file

@ -2882,6 +2882,12 @@ impl FMP4Mux {
drained_streams.push((
super::FragmentHeaderStream {
caps: stream.caps.clone(),
// We're setting the tfdt to the earliest PTS of the fragment as it is supposed
// to be the sum of all sample durations of all previous fragments.
//
// In case of negative DTS this is not the same as the start DTS of the
// fragment (actually negative or negative but the whole PTS/DTS timeline is
// shifted above zero) so instead we work with the earliest PTS.
start_time: Some(earliest_pts),
start_ntp_time,
delta_frames: stream.delta_frames,