stream: use PIPEWIRE_NODE env as target_id fallback

This commit is contained in:
Wim Taymans 2020-08-07 16:19:06 +02:00
parent b89e07f8c0
commit 5d90fe26f3

View file

@ -1466,6 +1466,8 @@ pw_stream_connect(struct pw_stream *stream,
if (target_id != PW_ID_ANY)
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_DRIVER)