mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pulse: first sync globals, then try operations
First sync the globals and if no global created new pending operations, run through the operations. This ensures no operation is run before all globals have data.
This commit is contained in:
parent
60df925dfd
commit
19c9a55050
1 changed files with 8 additions and 5 deletions
|
|
@ -1492,17 +1492,20 @@ static void core_done(void *data, uint32_t id, int seq)
|
|||
if (c->pending_seq != seq)
|
||||
return;
|
||||
|
||||
spa_list_init(&ops);
|
||||
spa_list_consume(o, &c->operations, link) {
|
||||
spa_list_remove(&o->link);
|
||||
spa_list_append(&ops, &o->link);
|
||||
}
|
||||
spa_list_for_each(g, &c->globals, link) {
|
||||
if (g->sync) {
|
||||
do_global_sync(g);
|
||||
g->sync = false;
|
||||
}
|
||||
}
|
||||
if (c->pending_seq != seq)
|
||||
return;
|
||||
|
||||
spa_list_init(&ops);
|
||||
spa_list_consume(o, &c->operations, link) {
|
||||
spa_list_remove(&o->link);
|
||||
spa_list_append(&ops, &o->link);
|
||||
}
|
||||
spa_list_for_each_safe(o, t, &ops, link) {
|
||||
if (!o->sync)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue