mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
stream-restore: Don't save the default sink/source as a target
If the default sink or source is set as the target, just don't save the new target so that it follows the new default. This is a workaround for gnome-control-center first setting the default source/sink and then setting the targets on all stream-restore database entries to the new default. Setting an explicit target will pin the stream to that sink/source forever, which is then making pavucontrol default source/sink toggle fail. See #676
This commit is contained in:
parent
d9b80fda37
commit
5712992fc9
1 changed files with 3 additions and 1 deletions
|
|
@ -238,7 +238,9 @@ static int do_extension_stream_restore_write(struct client *client, uint32_t com
|
|||
fprintf(f, "%s\"%s\"", (i == 0 ? " ":", "), channel_id2name(map.map[i]));
|
||||
fprintf(f, " ]");
|
||||
}
|
||||
if (device_name != NULL && device_name[0])
|
||||
if (device_name != NULL && device_name[0] &&
|
||||
strcmp(device_name, client->default_source) != 0 &&
|
||||
strcmp(device_name, client->default_sink) != 0)
|
||||
fprintf(f, ", \"target-node\": \"%s\"", device_name);
|
||||
fprintf(f, " }");
|
||||
fclose(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue