From dd683176c23d4d7e16201306e63c02e0cea5937b Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 3 Apr 2025 06:59:31 -0400 Subject: [PATCH] gst: sink: Set provide clock flag if not in provide mode Handle a theoretical corner case of an element that is first started with mode=provide, and then restarted without mode=provide. --- src/gst/gstpipewiresink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c index 981058bb1..26be00195 100644 --- a/src/gst/gstpipewiresink.c +++ b/src/gst/gstpipewiresink.c @@ -1052,6 +1052,8 @@ gst_pipewire_sink_change_state (GstElement * element, GstStateChange transition) * clock to drive the pipeline (and thus the graph). */ if (this->mode == GST_PIPEWIRE_SINK_MODE_PROVIDE) GST_OBJECT_FLAG_UNSET (this, GST_ELEMENT_FLAG_PROVIDE_CLOCK); + else + GST_OBJECT_FLAG_SET (this, GST_ELEMENT_FLAG_PROVIDE_CLOCK); /* the initial stream state is active, which is needed for linking and * negotiation to happen and the bufferpool to be set up. We don't know