Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>2023-10-25 20:03:52 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-11-10 18:47:41 +0300
commit9ffcb146170e2709278599a64303632947fc6dc3 (patch)
treef0c8d53d09f2dad9fd66d7d39d2528ee925c6aa5
parent8114f94f73cd74286375d9129ad9ec77e17dc2cd (diff)
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/1387>
-rw-r--r--utils/livesync/src/livesync/imp.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/utils/livesync/src/livesync/imp.rs b/utils/livesync/src/livesync/imp.rs
index c5c821be4..fa155689e 100644
--- a/utils/livesync/src/livesync/imp.rs
+++ b/utils/livesync/src/livesync/imp.rs
@@ -1171,8 +1171,18 @@ 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);