From 020371f145705a69cb7b4a0188d144ca78d2d57e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 14 Nov 2018 11:48:04 +0100 Subject: [PATCH] output/alsa: wake up the client thread after generating silence Fixes a theoretical race condition which could occur in Drain() (but was extremely unlikely). --- src/output/plugins/AlsaOutputPlugin.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index ee1487fb0..b258ed1fd 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -964,6 +964,7 @@ try { { const std::lock_guard lock(mutex); active = false; + cond.signal(); } /* avoid race condition: see if data has