mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
jack: Disconnect owned links on jack_deactivate
As per JACK API description the call to jack_deactivate should disconnect all ports because an inactive client can't have connections. This disconnect is missing in the current API and results in left-over links after the call and malfunction to clients (e.g. Music Player Daemon). To fix it this commit goes through the list of links to owned ports and disconnect them. Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
This commit is contained in:
parent
6aeb640e31
commit
205774f3ab
1 changed files with 7 additions and 0 deletions
|
|
@ -3511,6 +3511,7 @@ done:
|
|||
SPA_EXPORT
|
||||
int jack_deactivate (jack_client_t *client)
|
||||
{
|
||||
struct object *l;
|
||||
struct client *c = (struct client *) client;
|
||||
int res;
|
||||
|
||||
|
|
@ -3529,6 +3530,12 @@ int jack_deactivate (jack_client_t *client)
|
|||
c->activation->pending_new_pos = false;
|
||||
c->activation->pending_sync = false;
|
||||
|
||||
spa_list_for_each(l, &c->context.links, link) {
|
||||
if (l->port_link.src_ours || l->port_link.dst_ours) {
|
||||
pw_registry_destroy(c->registry, l->id);
|
||||
}
|
||||
}
|
||||
|
||||
res = do_sync(c);
|
||||
|
||||
pw_data_loop_start(c->loop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue