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.
This commit is contained in:
Wim Taymans 2023-03-23 18:50:24 +01:00
parent 6e8625cf96
commit f309543810

View file

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