From caeaaf9c240a531592a26c59769d9845352e547d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 3 May 2023 12:51:34 +0200 Subject: [PATCH] impl-node: work around old clients Old clients (screencast) set the TRIGGERED state before signaling node_ready, which causes errors in pw-top. Patch this up here. --- src/pipewire/impl-node.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c index 169bb5fb2..0440a3880 100644 --- a/src/pipewire/impl-node.c +++ b/src/pipewire/impl-node.c @@ -1712,10 +1712,13 @@ static int node_ready(void *data, int status) } node_signal_func(node); } else { - /* calculate CPU time */ + /* old nodes set the TRIGGERED status on node_ready, patch this + * up here to avoid errors in pw-top */ + a->status = PW_NODE_ACTIVATION_FINISHED; a->signal_time = a->prev_signal_time; a->prev_signal_time = impl->prev_signal_time; + /* calculate CPU time */ calculate_stats(node, a); pw_log_trace_fp("%p: graph completed wait:%"PRIu64" run:%"PRIu64