From 93d30519663a48c42c45aee108a48b1cbfcbb021 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 14 Jan 2022 17:55:24 +0200 Subject: [PATCH] Revert "default-nodes: increase priority if node has available routes" This reverts commit ad80faaa8da75fd562cac4eb776312b83160c9d9. The same issue is fixed by the intermediate commit by Wim. Let's revert this to keep the logic in-sync with policy-node.lua and media-session. --- modules/module-default-nodes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/module-default-nodes.c b/modules/module-default-nodes.c index 15aadeaa..5eddacbf 100644 --- a/modules/module-default-nodes.c +++ b/modules/module-default-nodes.c @@ -212,11 +212,11 @@ find_best_media_class_node (WpDefaultNodes * self, const gchar *media_class, WP_PIPEWIRE_OBJECT (node), PW_KEY_PRIORITY_SESSION); gint prio = prio_str ? atoi (prio_str) : -1; - if (node_has_available_routes (self, node)) - prio += 10000; + if (!node_has_available_routes (self, node)) + continue; if (name && node_name && g_strcmp0 (name, node_name) == 0) - prio += 20000; + prio += 10000; if (prio > highest_prio || res == NULL) { highest_prio = prio;