diff --git a/src/drivers/fluid_pipewire.c b/src/drivers/fluid_pipewire.c index c16c57614..3e6c18e65 100644 --- a/src/drivers/fluid_pipewire.c +++ b/src/drivers/fluid_pipewire.c @@ -296,7 +296,7 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p) if (drv->pw_loop) { - pw_thread_loop_stop(drv->pw_loop); + pw_thread_loop_lock(drv->pw_loop); } if(drv->pw_stream) @@ -306,6 +306,7 @@ void delete_fluid_pipewire_audio_driver(fluid_audio_driver_t *p) if(drv->pw_loop) { + pw_thread_loop_unlock(drv->pw_loop); pw_thread_loop_destroy(drv->pw_loop); }