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.
This commit is contained in:
Wim Taymans 2020-12-20 11:41:59 +01:00
parent 9f766dd708
commit 34c33ccdbf

View file

@ -643,6 +643,9 @@ static int rescan_node(struct impl *impl, struct node *n)
if (path_id != SPA_ID_INVALID) { if (path_id != SPA_ID_INVALID) {
pw_log_debug(NAME " %p: target:%d", impl, path_id); 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) { if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) {
pw_log_debug(NAME " %p: found target:%d type:%s", impl, pw_log_debug(NAME " %p: found target:%d type:%s", impl,
path_id, obj->type); path_id, obj->type);