mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: module arguments can be NULL
This commit is contained in:
parent
e7b04bca2c
commit
8383e86f33
2 changed files with 3 additions and 7 deletions
|
|
@ -210,11 +210,6 @@ static struct module *create_module_loopback(struct impl *impl, const char *argu
|
||||||
struct spa_audio_info_raw info = { 0 };
|
struct spa_audio_info_raw info = { 0 };
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (argument == NULL) {
|
|
||||||
res = -EINVAL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
props = pw_properties_new(NULL, NULL);
|
props = pw_properties_new(NULL, NULL);
|
||||||
capture_props = pw_properties_new(NULL, NULL);
|
capture_props = pw_properties_new(NULL, NULL);
|
||||||
playback_props = pw_properties_new(NULL, NULL);
|
playback_props = pw_properties_new(NULL, NULL);
|
||||||
|
|
@ -222,6 +217,7 @@ static struct module *create_module_loopback(struct impl *impl, const char *argu
|
||||||
res = -EINVAL;
|
res = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (argument)
|
||||||
add_props(props, argument);
|
add_props(props, argument);
|
||||||
|
|
||||||
/* The following modargs are not implemented:
|
/* The following modargs are not implemented:
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ static struct module *create_module(struct client *client, const char *name, con
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
module->name = strdup(name);
|
module->name = strdup(name);
|
||||||
module->args = strdup(args);
|
module->args = args ? strdup(args) : NULL;
|
||||||
module->idx |= MODULE_FLAG;
|
module->idx |= MODULE_FLAG;
|
||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue