livesync: Remove the stop from outgoing segments

Our buffer duplication can extend a segment indefinitely.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/452
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1372>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-10-25 19:03:52 +02:00
parent f1ba498b52
commit e3e58ac0be

View file

@ -1157,8 +1157,13 @@ impl LiveSync {
state.out_duration = duration_from_caps(&caps);
}
if let Some(segment) = segment {
if let Some(mut segment) = segment {
if !state.single_segment {
if let Some(stop) = segment.stop() {
gst::debug!(CAT, imp: self, "Removing stop {} from outgoing segment", stop);
segment.set_stop(gst::ClockTime::NONE);
}
gst::debug!(CAT, imp: self, "Forwarding segment: {:?}", segment);
let event = gst::event::Segment::new(&segment);