From ff1f793a6303fd08e11981406265b0971f98bc3d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 30 Apr 2024 13:27:42 +0200 Subject: [PATCH] stream: only overwite node.loop.class when unset --- src/pipewire/filter.c | 3 ++- src/pipewire/stream.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index dc771c40c..0bb8d8769 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -1597,7 +1597,8 @@ pw_filter_connect(struct pw_filter *filter, filter_set_state(filter, PW_FILTER_STATE_CONNECTING, 0, NULL); if (!SPA_FLAG_IS_SET(flags, PW_FILTER_FLAG_RT_PROCESS)) { - pw_properties_set(filter->properties, PW_KEY_NODE_LOOP_CLASS, "main"); + if (pw_properties_get(filter->properties, PW_KEY_NODE_LOOP_CLASS) == NULL) + pw_properties_set(filter->properties, PW_KEY_NODE_LOOP_CLASS, "main"); pw_properties_set(filter->properties, PW_KEY_NODE_ASYNC, "true"); } if (flags & PW_FILTER_FLAG_DRIVER) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 566aff156..29bc5468d 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1957,7 +1957,8 @@ pw_stream_connect(struct pw_stream *stream, pw_properties_set(stream->properties, PW_KEY_NODE_DONT_RECONNECT, "true"); if (!SPA_FLAG_IS_SET(flags, PW_STREAM_FLAG_RT_PROCESS)) { - pw_properties_set(stream->properties, PW_KEY_NODE_LOOP_CLASS, "main"); + if (pw_properties_get(stream->properties, PW_KEY_NODE_LOOP_CLASS) == NULL) + pw_properties_set(stream->properties, PW_KEY_NODE_LOOP_CLASS, "main"); pw_properties_set(stream->properties, PW_KEY_NODE_ASYNC, "true"); } if (flags & PW_STREAM_FLAG_DRIVER)