mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: remove .monitor suffix when set as default source
We place the sink name in the metadata when it is used as a default source.
This commit is contained in:
parent
d0636875ee
commit
8d7c5732db
1 changed files with 3 additions and 0 deletions
|
|
@ -4904,6 +4904,9 @@ static int do_set_default(struct client *client, uint32_t command, uint32_t tag,
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
|
if (pw_endswith(name, ".monitor"))
|
||||||
|
name = strndupa(name, strlen(name)-8);
|
||||||
|
|
||||||
res = pw_manager_set_metadata(manager, client->metadata_default,
|
res = pw_manager_set_metadata(manager, client->metadata_default,
|
||||||
PW_ID_CORE,
|
PW_ID_CORE,
|
||||||
sink ? METADATA_CONFIG_DEFAULT_SINK : METADATA_CONFIG_DEFAULT_SOURCE,
|
sink ? METADATA_CONFIG_DEFAULT_SINK : METADATA_CONFIG_DEFAULT_SOURCE,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue