From f309543810e32dc37a93ab8d843c87cf2c2a118f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 23 Mar 2023 18:50:24 +0100 Subject: [PATCH] context: update the duration/rate directly when node idle When the node is not running, update the duration/rate directly so that followers can see the current duration/rate when they start. --- src/pipewire/context.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 3043e3439..c9ae8fbbd 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1386,6 +1386,11 @@ again: n->rt.position->clock.target_duration = n->target_quantum; n->rt.position->clock.target_rate = n->target_rate; SEQ_WRITE(n->rt.position->clock.target_seq); + + if (n->info.state < PW_NODE_STATE_RUNNING) { + n->rt.position->clock.duration = n->target_quantum; + n->rt.position->clock.rate = n->target_rate; + } n->target_pending = false; }