mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
impl-node: don't update rt.position directly
When moving a driver to another, move the quantum and rate to the current_ fields so that they are applied when the next cycle starts instead of during the cycle.
This commit is contained in:
parent
aefb527a0c
commit
dbe61af543
1 changed files with 4 additions and 4 deletions
|
|
@ -812,11 +812,11 @@ int pw_impl_node_set_driver(struct pw_impl_node *node, struct pw_impl_node *driv
|
||||||
remove_segment_owner(old, node->info.id);
|
remove_segment_owner(old, node->info.id);
|
||||||
|
|
||||||
if (old != node && old->driving && driver->info.state < PW_NODE_STATE_RUNNING) {
|
if (old != node && old->driving && driver->info.state < PW_NODE_STATE_RUNNING) {
|
||||||
driver->rt.activation->position.clock.rate = old->rt.position->clock.rate;
|
driver->current_rate = old->current_rate;
|
||||||
driver->rt.activation->position.clock.duration = old->rt.position->clock.duration;
|
driver->current_quantum = old->current_quantum;
|
||||||
pw_log_info("move quantum:%"PRIu64" rate:%d (%s-%d -> %s-%d)",
|
pw_log_info("move quantum:%"PRIu64" rate:%d (%s-%d -> %s-%d)",
|
||||||
driver->rt.activation->position.clock.duration,
|
driver->current_quantum,
|
||||||
driver->rt.activation->position.clock.rate.denom,
|
driver->current_rate.denom,
|
||||||
old->name, old->info.id,
|
old->name, old->info.id,
|
||||||
driver->name, driver->info.id);
|
driver->name, driver->info.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue