mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pulse-server: fix module arg parsing
Parse the module arguments according to the pulseaudio syntax, not our own syntax (which requires "" around a , delimter). Fixes audio.position=FL,FR argument. See #527
This commit is contained in:
parent
776147c125
commit
518365e350
1 changed files with 5 additions and 1 deletions
|
|
@ -133,6 +133,8 @@ static void add_props(struct pw_properties *props, const char *str)
|
|||
f = ' ';
|
||||
}
|
||||
e = strchr(p, f);
|
||||
if (e == NULL)
|
||||
e = strchr(p, '\0');
|
||||
if (e == NULL)
|
||||
break;
|
||||
*e = '\0';
|
||||
|
|
@ -156,11 +158,13 @@ static int load_module(struct client *client, const char *name, const char *argu
|
|||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
props = pw_properties_new_string(argument);
|
||||
props = pw_properties_new(NULL, NULL);
|
||||
if (props == NULL) {
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
add_props(props, argument);
|
||||
|
||||
if ((str = pw_properties_get(props, "sink_name")) != NULL) {
|
||||
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
||||
pw_properties_set(props, "sink_name", NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue