diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 906fc96f1..56191b93c 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -4886,9 +4886,15 @@ int jack_activate (jack_client_t *client) c->activation->pending_new_pos = true; c->activation->pending_sync = true; + /* emits all foreign active ports, skips own (already announced via jack_port_register) */ spa_list_for_each(o, &c->context.objects, link) { - if (o->type != INTERFACE_Port || o->port.port == NULL || - o->port.port->client != c || !o->port.port->valid) + if (o->type != INTERFACE_Port || o->removed) + continue; + /* own ports are handled by jack_port_register */ + if (o->port.port != NULL && o->port.port->client == c) + continue; + /* only announce ports whose node is active */ + if (o->port.node != NULL && !node_is_active(c, o->port.node)) continue; o->registered = 0; queue_notify(c, NOTIFY_TYPE_PORTREGISTRATION, o, 1, NULL);