node: update the duration/rate from the target

Before scheduling the graph from the driver, update the duration and
rate with the new targets.
This commit is contained in:
Wim Taymans 2023-03-23 18:39:27 +01:00
parent 1bdd5eee69
commit 6e8625cf96
13 changed files with 87 additions and 3 deletions

View file

@ -1042,6 +1042,9 @@ static void avb_on_timeout_event(struct spa_source *source)
current_time = state->next_time;
if (SPA_LIKELY(state->position)) {
state->position->clock.duration = state->position->clock.target_duration;
state->position->clock.rate = state->position->clock.target_rate;
duration = state->position->clock.duration;
rate = state->position->clock.rate.denom;
} else {