Commit 4580c685 authored by Max Kellermann's avatar Max Kellermann

output/Thread: unlock the mutex for several AudioOutput calls

parent 67232453
......@@ -63,16 +63,20 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
if (open && cf != output->filter_audio_format) {
/* if the filter's output format changes, the output
must be reopened as well */
output->CloseOutput(true);
open = false;
const ScopeUnlock unlock(mutex);
output->CloseOutput(true);
}
output->filter_audio_format = cf;
if (!open) {
try {
const ScopeUnlock unlock(mutex);
output->OpenOutputAndConvert(output->filter_audio_format);
} catch (...) {
const ScopeUnlock unlock(mutex);
output->CloseFilter();
throw;
}
......
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