fmp4mux: Only push fragment_offset if write_mfra is true

This is done so that the fragment_offset vector does not infinitely
build up when write_mfra is disabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1023>
This commit is contained in:
Johan Bjäreholt 2022-12-19 11:25:34 +01:00
parent 6607a63159
commit 71c268da14

View file

@ -1505,6 +1505,7 @@ impl FMP4Mux {
.collect::<gst::BufferList>(),
);
if settings.write_mfra {
// Write mfra only for the main stream, and if there are no buffers for the main stream
// in this segment then don't write anything.
if let Some(super::FragmentHeaderStream {
@ -1517,6 +1518,7 @@ impl FMP4Mux {
offset: moof_offset,
});
}
}
state.end_pts = Some(fragment_end_pts);