Commit e3ef3e8d authored by Max Kellermann's avatar Max Kellermann

output/Control: unlock mutex during expensive operations

parent 7574dfd3
...@@ -226,6 +226,7 @@ AudioOutputControl::Open(const AudioFormat audio_format, ...@@ -226,6 +226,7 @@ AudioOutputControl::Open(const AudioFormat audio_format,
const bool open2 = open; const bool open2 = open;
if (open2 && output->mixer != nullptr) { if (open2 && output->mixer != nullptr) {
const ScopeUnlock unlock(mutex);
try { try {
mixer_open(output->mixer); mixer_open(output->mixer);
} catch (...) { } catch (...) {
......
...@@ -501,5 +501,6 @@ AudioOutputControl::StartThread() ...@@ -501,5 +501,6 @@ AudioOutputControl::StartThread()
{ {
assert(command == Command::NONE); assert(command == Command::NONE);
const ScopeUnlock unlock(mutex);
thread.Start(); thread.Start();
} }
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