media-session: save last target_node

Keep a per node entry of the saved target node and use this when
there is no other target node.
When explicitly moving a stream, save the new target node.
This commit is contained in:
Wim Taymans 2020-10-14 12:35:27 +02:00
parent 1bd31c1cf1
commit 3733a5e219
4 changed files with 66 additions and 45 deletions

View file

@ -624,6 +624,8 @@ static void node_destroy(void *object)
pw_node_info_free(node->info);
node->info = NULL;
}
free(node->target_node);
node->target_node = NULL;
}
static const struct object_info node_info = {