keys: let env variables overwrite the keys

This commit is contained in:
Wim Taymans 2020-07-22 11:25:19 +02:00
parent 2955182e4e
commit 2bb1d88fbe
3 changed files with 10 additions and 10 deletions

View file

@ -980,12 +980,11 @@ static const struct spa_loop_control_hooks impl_hooks = {
static const char *
get_name(const struct spa_dict *props)
{
const char *name = NULL;
const char *name;
if (props)
name = getenv("PIPEWIRE_CORE");
if (props && name == NULL)
name = spa_dict_lookup(props, PW_KEY_CORE_NAME);
if (name == NULL)
name = getenv("PIPEWIRE_CORE");
if (name == NULL)
name = "pipewire-0";
return name;