mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
impl-node: start sync after reposition
After we get a reposition request, bring the state to the SYNC state again so that clients can align with the new position. Fixes a problem with reposition when using the jack transport. Fixes #1907
This commit is contained in:
parent
62660c1e87
commit
f5908dbddf
2 changed files with 8 additions and 1 deletions
|
|
@ -5690,6 +5690,7 @@ int jack_transport_reposition (jack_client_t *client,
|
|||
return -EINVAL;
|
||||
|
||||
pw_log_debug("frame:%u", pos->frame);
|
||||
spa_zero(na->reposition);
|
||||
na->reposition.flags = 0;
|
||||
na->reposition.start = 0;
|
||||
na->reposition.duration = 0;
|
||||
|
|
|
|||
|
|
@ -1602,6 +1602,7 @@ static int node_ready(void *data, int status)
|
|||
sync_type = check_updates(node, &reposition_owner);
|
||||
owner[0] = ATOMIC_LOAD(a->segment_owner[0]);
|
||||
owner[1] = ATOMIC_LOAD(a->segment_owner[1]);
|
||||
again:
|
||||
all_ready = sync_type == SYNC_CHECK;
|
||||
update_sync = !all_ready;
|
||||
target_sync = sync_type == SYNC_START ? true : false;
|
||||
|
|
@ -1638,8 +1639,13 @@ static int node_ready(void *data, int status)
|
|||
a->prev_signal_time = a->signal_time;
|
||||
a->sync_timeout = SPA_MIN(min_timeout, DEFAULT_SYNC_TIMEOUT);
|
||||
|
||||
if (SPA_UNLIKELY(reposition_node))
|
||||
if (SPA_UNLIKELY(reposition_node)) {
|
||||
do_reposition(node, reposition_node);
|
||||
sync_type = SYNC_START;
|
||||
reposition_owner = 0;
|
||||
reposition_node = NULL;
|
||||
goto again;
|
||||
}
|
||||
|
||||
update_position(node, all_ready);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue