mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: work around race condition in SET_DEFAULT/MOVE_*
The default metadata update may be delayed for some time after SET_DEFAULT, since the session manager has to work on it. MOVE_* commands need to know what the client thinks is the current default sink, so that they can decide between "move to default" and "move to specific device". To avoid race condition here, stash the default value set by the client and use it in the MOVE_* commands, until the metadata update arrives.
This commit is contained in:
parent
6188e4d074
commit
a46d4aedd7
3 changed files with 36 additions and 1 deletions
|
|
@ -75,6 +75,8 @@ struct client {
|
|||
struct pw_manager_object *metadata_default;
|
||||
char *default_sink;
|
||||
char *default_source;
|
||||
char *temporary_default_sink; /**< pending value, for MOVE_* commands */
|
||||
char *temporary_default_source; /**< pending value, for MOVE_* commands */
|
||||
struct pw_manager_object *metadata_routes;
|
||||
struct pw_properties *routes;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue