mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: arguments can be NULL
And module-null-sink does not have mandatory arguments.
This commit is contained in:
parent
cc7cbaa83b
commit
4aa817771a
1 changed files with 2 additions and 5 deletions
|
|
@ -112,16 +112,13 @@ static struct module *create_module_null_sink(struct impl *impl, const char *arg
|
||||||
const char *str;
|
const char *str;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (argument == NULL) {
|
|
||||||
res = -EINVAL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
props = pw_properties_new(NULL, NULL);
|
props = pw_properties_new(NULL, NULL);
|
||||||
if (props == NULL) {
|
if (props == NULL) {
|
||||||
res = -EINVAL;
|
res = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
add_props(props, argument);
|
if (argument)
|
||||||
|
add_props(props, argument);
|
||||||
|
|
||||||
if ((str = pw_properties_get(props, "sink_name")) != NULL) {
|
if ((str = pw_properties_get(props, "sink_name")) != NULL) {
|
||||||
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
pw_properties_set(props, PW_KEY_NODE_NAME, str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue