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.
This commit is contained in:
Wim Taymans 2023-05-03 12:51:34 +02:00
parent ea1385ffe0
commit caeaaf9c24

View file

@ -1712,10 +1712,13 @@ static int node_ready(void *data, int status)
} }
node_signal_func(node); node_signal_func(node);
} else { } 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->signal_time = a->prev_signal_time;
a->prev_signal_time = impl->prev_signal_time; a->prev_signal_time = impl->prev_signal_time;
/* calculate CPU time */
calculate_stats(node, a); calculate_stats(node, a);
pw_log_trace_fp("%p: graph completed wait:%"PRIu64" run:%"PRIu64 pw_log_trace_fp("%p: graph completed wait:%"PRIu64" run:%"PRIu64