mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
stream: PIPEWIRE_AUTOCONNECT env overrides config
Always make the env variable override any config setting. See #3299
This commit is contained in:
parent
abb300750f
commit
901388ae00
1 changed files with 5 additions and 3 deletions
|
|
@ -2007,10 +2007,12 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
/* XXX this is deprecated but still used by the portal and its apps */
|
||||
pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id);
|
||||
|
||||
if ((flags & PW_STREAM_FLAG_AUTOCONNECT) &&
|
||||
if ((str = getenv("PIPEWIRE_AUTOCONNECT")) != NULL)
|
||||
pw_properties_set(stream->properties,
|
||||
PW_KEY_NODE_AUTOCONNECT, spa_atob(str) ? "true" : "false");
|
||||
else if ((flags & PW_STREAM_FLAG_AUTOCONNECT) &&
|
||||
pw_properties_get(stream->properties, PW_KEY_NODE_AUTOCONNECT) == NULL) {
|
||||
str = getenv("PIPEWIRE_AUTOCONNECT");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, str ? str : "true");
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "true");
|
||||
}
|
||||
if (flags & PW_STREAM_FLAG_DRIVER)
|
||||
pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "true");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue