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
parent 832c5a6d25
commit dd683176c2

View file

@ -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