diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 9e9952c1e..baa0acdb5 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1554,8 +1554,10 @@ pw_stream_connect(struct pw_stream *stream, pw_properties_setf(stream->properties, PW_KEY_NODE_TARGET, "%d", target_id); else if ((str = getenv("PIPEWIRE_NODE")) != NULL) pw_properties_set(stream->properties, PW_KEY_NODE_TARGET, str); - if (flags & PW_STREAM_FLAG_AUTOCONNECT) - pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, "true"); + if (flags & PW_STREAM_FLAG_AUTOCONNECT) { + str = getenv("PIPEWIRE_AUTOCONNECT"); + pw_properties_set(stream->properties, PW_KEY_NODE_AUTOCONNECT, str ? str : "true"); + } if (flags & PW_STREAM_FLAG_DRIVER) pw_properties_set(stream->properties, PW_KEY_NODE_DRIVER, "true"); if (flags & PW_STREAM_FLAG_EXCLUSIVE)