pulse-server: optimize link finding

When we get a new link object, only check if a pending stream is linked
according to the new link instead of iterating all links.
This commit is contained in:
Wim Taymans 2022-06-03 15:48:08 +02:00
parent 6c310cf5e2
commit 258a203d74
3 changed files with 32 additions and 18 deletions

View file

@ -829,7 +829,7 @@ static void manager_added(void *data, struct pw_manager_object *o)
struct stream *s;
struct pw_manager_object *peer = NULL;
spa_list_for_each(s, &client->pending_streams, link) {
peer = find_linked(manager, s->id, s->direction);
peer = find_peer_for_link(manager, o, s->id, s->direction);
if (peer)
break;
}