From b4855f1ba8c8e2d775fd7f1b14ccb9be17e702c7 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Wed, 25 Oct 2023 19:03:52 +0200 Subject: 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: --- utils/livesync/src/livesync/imp.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/livesync/src/livesync/imp.rs b/utils/livesync/src/livesync/imp.rs index 268eb1d7a..5434defd3 100644 --- a/utils/livesync/src/livesync/imp.rs +++ b/utils/livesync/src/livesync/imp.rs @@ -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); -- cgit v1.2.3