From 34c33ccdbf9dee8bf8d6984ad1f66cfb6ed69d1a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 20 Dec 2020 11:41:59 +0100 Subject: [PATCH] policy-node: clear target node for dont-reconnect streams When a stream is marked don't reconnect, clear the target-node so that it does not accidentally gets linked to a save target. This makes it kill the monitor stream from pavucontrol after a client disconnects. --- src/examples/media-session/policy-node.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/examples/media-session/policy-node.c b/src/examples/media-session/policy-node.c index 83f092f1d..ed2466438 100644 --- a/src/examples/media-session/policy-node.c +++ b/src/examples/media-session/policy-node.c @@ -643,6 +643,9 @@ static int rescan_node(struct impl *impl, struct node *n) if (path_id != SPA_ID_INVALID) { pw_log_debug(NAME " %p: target:%d", impl, path_id); + if (!reconnect) + n->obj->target_node = NULL; + if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) { pw_log_debug(NAME " %p: found target:%d type:%s", impl, path_id, obj->type);