mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
pulse-server: Support clearing default sink/source
The PulseAudio way of doing this is to accept @NONE@ to clear the default setting, so let's accept that.
This commit is contained in:
parent
2374d034d7
commit
3337af64ca
1 changed files with 4 additions and 0 deletions
|
|
@ -4674,6 +4674,10 @@ static int do_set_default(struct client *client, uint32_t command, uint32_t tag,
|
|||
pw_log_info("[%s] %s tag:%u name:%s", client->name,
|
||||
commands[command].name, tag, name);
|
||||
|
||||
/* @NONE@ is used to clear the setting */
|
||||
if (spa_streq(name, "@NONE@"))
|
||||
name = NULL;
|
||||
|
||||
if (name != NULL && (o = find_device(client, SPA_ID_INVALID, name, sink, NULL)) == NULL)
|
||||
return -ENOENT;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue