From 432f927da91ed1d10ee3068f0ce72280bd810064 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 1 Mar 2023 16:21:07 +0100 Subject: [PATCH] module-rtp: listen only for compatible sessions --- src/modules/module-rtp-session.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/modules/module-rtp-session.c b/src/modules/module-rtp-session.c index cac2aeaf3..08b2bc041 100644 --- a/src/modules/module-rtp-session.c +++ b/src/modules/module-rtp-session.c @@ -1248,15 +1248,14 @@ static int make_browser(struct impl *impl) { const char *service_name; + service_name = get_service_name(impl); + if (service_name == NULL) + return -EINVAL; + if (impl->browser == NULL) { impl->browser = avahi_service_browser_new(impl->client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, - "_apple-midi._udp", NULL, 0, - browser_cb, impl); - - avahi_service_browser_new(impl->client, - AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, - "_pipewire-audio._udp", NULL, 0, + service_name, NULL, 0, browser_cb, impl); } if (impl->browser == NULL) {