From f34f7b9869f503cf47250b0413a46055ad74d214 Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Vara Larsen Date: Fri, 24 Nov 2023 16:16:31 +0100 Subject: [PATCH] sound/pipewire: stop threadloop before destroying context During release(), the threadloop has to be stopped before the context is destroyed, otherwise the threadloop continues to execute thus ending in crashes due to SIGABRT or SIGSEGV. Signed-off-by: Matias Ezequiel Vara Larsen --- staging/vhost-device-sound/src/audio_backends/pipewire.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/vhost-device-sound/src/audio_backends/pipewire.rs b/staging/vhost-device-sound/src/audio_backends/pipewire.rs index 1f472cd..d72772c 100644 --- a/staging/vhost-device-sound/src/audio_backends/pipewire.rs +++ b/staging/vhost-device-sound/src/audio_backends/pipewire.rs @@ -503,6 +503,7 @@ impl AudioBackend for PwBackend { stream_hash.remove(&stream_id); stream_listener.remove(&stream_id); lock_guard.unlock(); + self.thread_loop.stop(); Ok(()) }