From a683049986687b0a3e213050142a00fda88f3b88 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 10 Apr 2024 16:45:18 +0200 Subject: [PATCH] impl-node: only become driving when we are a driver We don't just need to check the clock and position clock id, we also need to be able to become a driver before we can be driving. --- src/pipewire/impl-node.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c index 526e77c8b..a86630dcd 100644 --- a/src/pipewire/impl-node.c +++ b/src/pipewire/impl-node.c @@ -741,9 +741,13 @@ int pw_impl_node_set_io(struct pw_impl_node *this, uint32_t id, void *data, size this->rt.target.id = this->info.id; break; } - this->driving = this->rt.clock && this->rt.position && + this->driving = this->driver && this->rt.clock && this->rt.position && this->rt.position->clock.id == this->rt.clock->id; + pw_log_debug("%p: driving:%d %d %d", this, this->driving, + this->rt.clock ? this->rt.clock->id : SPA_ID_INVALID, + this->rt.position ? this->rt.position->clock.id : SPA_ID_INVALID); + spa_list_for_each(port, &this->input_ports, link) spa_node_set_io(port->mix, id, data, size); spa_list_for_each(port, &this->output_ports, link)