Commit 5dfdc15f authored by Max Kellermann's avatar Max Kellermann

output/alsa: rethrow errors in Drain()

parent a6e58734
...@@ -762,12 +762,19 @@ AlsaOutput::Drain() ...@@ -762,12 +762,19 @@ AlsaOutput::Drain()
{ {
const std::lock_guard<Mutex> lock(mutex); const std::lock_guard<Mutex> lock(mutex);
if (error)
std::rethrow_exception(error);
drain = true; drain = true;
UnlockActivate(); UnlockActivate();
while (drain && !error) while (drain) {
if (error)
std::rethrow_exception(error);
cond.wait(mutex); cond.wait(mutex);
}
} }
inline void inline void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment