From 7c615f4e649a16eb3b8c7f34dd5e3dbbf8c2b980 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 Jan 2020 15:16:32 +0100 Subject: [PATCH] stream: only set media.class when not set before --- src/pipewire/stream.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 16372aeff..3273d5706 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1381,9 +1381,11 @@ pw_stream_connect(struct pw_stream *stream, if (flags & PW_STREAM_FLAG_DONT_RECONNECT) pw_properties_set(stream->properties, PW_KEY_NODE_DONT_RECONNECT, "1"); - pw_properties_setf(stream->properties, PW_KEY_MEDIA_CLASS, "Stream/%s/%s", - direction == PW_DIRECTION_INPUT ? "Input" : "Output", - get_media_class(impl)); + if ((pw_properties_get(stream->properties, PW_KEY_MEDIA_CLASS) == NULL)) { + pw_properties_setf(stream->properties, PW_KEY_MEDIA_CLASS, "Stream/%s/%s", + direction == PW_DIRECTION_INPUT ? "Input" : "Output", + get_media_class(impl)); + } if (stream->core == NULL) { stream->core = pw_context_connect(impl->context,