mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
jack: make sure we can always find our own ports
find_port_by_name() is used to find our own ports before they become visible so make sure we can always find them. Fixes #3485
This commit is contained in:
parent
32084ff3c6
commit
c41c812325
1 changed files with 9 additions and 1 deletions
|
|
@ -719,12 +719,20 @@ static bool is_port_default(struct client *c, struct object *o)
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline bool client_port_visible(struct client *c, struct object *o)
|
||||
{
|
||||
if (o->port.port != NULL && o->port.port->client == c)
|
||||
return true;
|
||||
return o->visible;
|
||||
}
|
||||
|
||||
static struct object *find_port_by_name(struct client *c, const char *name)
|
||||
{
|
||||
struct object *o;
|
||||
|
||||
spa_list_for_each(o, &c->context.objects, link) {
|
||||
if (o->type != INTERFACE_Port || o->removed || !o->visible)
|
||||
if (o->type != INTERFACE_Port || o->removed ||
|
||||
(!client_port_visible(c, o)))
|
||||
continue;
|
||||
if (spa_streq(o->port.name, name) ||
|
||||
spa_streq(o->port.alias1, name) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue