From 76870f7b944371a0c474e275a857b0b34eac1ec7 Mon Sep 17 00:00:00 2001 From: Marcus Weseloh Date: Tue, 26 Mar 2024 15:07:33 +0100 Subject: [PATCH] Lock thread loop before destroying stream Better fix for #1305 --- src/drivers/fluid_pipewire.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }