Commit 8fc37681 authored by Max Kellermann's avatar Max Kellermann

OutputThread: unlock mutex for CloseFilter()

Be consistent.
parent b07bddf7
......@@ -383,7 +383,12 @@ private:
void Reopen();
AudioFormat OpenFilter(AudioFormat &format, Error &error_r);
/**
* Mutex must not be locked.
*/
void CloseFilter();
void ReopenFilter();
/**
......
......@@ -174,7 +174,10 @@ AudioOutput::Open()
FormatError(error, "Failed to open \"%s\" [%s]",
name, plugin.name);
mutex.unlock();
CloseFilter();
mutex.lock();
fail_timer.Update();
return;
}
......@@ -184,7 +187,10 @@ AudioOutput::Open()
FormatError(error, "Failed to convert for \"%s\" [%s]",
name, plugin.name);
mutex.unlock();
CloseFilter();
mutex.lock();
fail_timer.Update();
return;
}
......@@ -233,7 +239,10 @@ AudioOutput::ReopenFilter()
{
Error error;
mutex.unlock();
CloseFilter();
mutex.lock();
const AudioFormat filter_audio_format =
OpenFilter(in_audio_format, error);
if (!filter_audio_format.IsDefined() ||
......
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