Commit b477f86c authored by Max Kellermann's avatar Max Kellermann

output/alsa: don't lock the mutex in CancelInternal()

CancelInternal() doesn't need to be protected because it is called synchronously from Cancel().
parent 020371f1
......@@ -796,6 +796,9 @@ AlsaOutput::Drain()
inline void
AlsaOutput::CancelInternal() noexcept
{
/* this method doesn't need to lock the mutex because while it
runs, the calling thread is blocked inside Cancel() */
must_prepare = true;
snd_pcm_drop(pcm);
......@@ -804,10 +807,7 @@ AlsaOutput::CancelInternal() noexcept
period_buffer.Clear();
ring_buffer->reset();
{
const std::lock_guard<Mutex> lock(mutex);
active = false;
}
active = false;
MultiSocketMonitor::Reset();
defer_invalidate_sockets.Cancel();
......
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