mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
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:
parent
6607a63159
commit
71c268da14
1 changed files with 13 additions and 11 deletions
|
@ -1505,17 +1505,19 @@ impl FMP4Mux {
|
||||||
.collect::<gst::BufferList>(),
|
.collect::<gst::BufferList>(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Write mfra only for the main stream, and if there are no buffers for the main stream
|
if settings.write_mfra {
|
||||||
// in this segment then don't write anything.
|
// Write mfra only for the main stream, and if there are no buffers for the main stream
|
||||||
if let Some(super::FragmentHeaderStream {
|
// in this segment then don't write anything.
|
||||||
start_time: Some(start_time),
|
if let Some(super::FragmentHeaderStream {
|
||||||
..
|
start_time: Some(start_time),
|
||||||
}) = streams.get(0)
|
..
|
||||||
{
|
}) = streams.get(0)
|
||||||
state.fragment_offsets.push(super::FragmentOffset {
|
{
|
||||||
time: *start_time,
|
state.fragment_offsets.push(super::FragmentOffset {
|
||||||
offset: moof_offset,
|
time: *start_time,
|
||||||
});
|
offset: moof_offset,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state.end_pts = Some(fragment_end_pts);
|
state.end_pts = Some(fragment_end_pts);
|
||||||
|
|
Loading…
Reference in a new issue