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.
This commit is contained in:
Arun Raghavan 2025-04-03 06:59:31 -04:00 committed by Arun Raghavan
parent 4939a957c6
commit 6e4ded46f0

View file

@ -1042,6 +1042,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