jack: don't call callbacks when deactivating

Set the active state to false right when we start deactivate to make
sure that we don't call any callbacks anymore during shutdown.

One of the callbacks that might be called is the bufsize of samplerate
change callbacks when the node is moved to the dummy driver and this
might deadlock any app that doesn't expect this.

Fixes #2781
This commit is contained in:
Wim Taymans 2023-03-29 16:18:26 +02:00
parent 5ae73fccdd
commit 495a227e5e

View file

@ -3800,6 +3800,8 @@ int jack_deactivate (jack_client_t *client)
return 0;
pw_thread_loop_lock(c->context.loop);
c->active = false;
pw_data_loop_stop(c->loop);
pw_client_node_set_active(c->node, false);
@ -3818,12 +3820,7 @@ int jack_deactivate (jack_client_t *client)
pw_thread_loop_unlock(c->context.loop);
if (res < 0)
return res;
c->active = false;
return 0;
return res;
}
SPA_EXPORT