OutputThread: unlock mutex for CloseFilter()
Be consistent.
This commit is contained in:
parent
b07bddf742
commit
8fc3768166
@ -383,7 +383,12 @@ private:
|
|||||||
void Reopen();
|
void Reopen();
|
||||||
|
|
||||||
AudioFormat OpenFilter(AudioFormat &format, Error &error_r);
|
AudioFormat OpenFilter(AudioFormat &format, Error &error_r);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mutex must not be locked.
|
||||||
|
*/
|
||||||
void CloseFilter();
|
void CloseFilter();
|
||||||
|
|
||||||
void ReopenFilter();
|
void ReopenFilter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +174,10 @@ AudioOutput::Open()
|
|||||||
FormatError(error, "Failed to open \"%s\" [%s]",
|
FormatError(error, "Failed to open \"%s\" [%s]",
|
||||||
name, plugin.name);
|
name, plugin.name);
|
||||||
|
|
||||||
|
mutex.unlock();
|
||||||
CloseFilter();
|
CloseFilter();
|
||||||
|
mutex.lock();
|
||||||
|
|
||||||
fail_timer.Update();
|
fail_timer.Update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -184,7 +187,10 @@ AudioOutput::Open()
|
|||||||
FormatError(error, "Failed to convert for \"%s\" [%s]",
|
FormatError(error, "Failed to convert for \"%s\" [%s]",
|
||||||
name, plugin.name);
|
name, plugin.name);
|
||||||
|
|
||||||
|
mutex.unlock();
|
||||||
CloseFilter();
|
CloseFilter();
|
||||||
|
mutex.lock();
|
||||||
|
|
||||||
fail_timer.Update();
|
fail_timer.Update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -233,7 +239,10 @@ AudioOutput::ReopenFilter()
|
|||||||
{
|
{
|
||||||
Error error;
|
Error error;
|
||||||
|
|
||||||
|
mutex.unlock();
|
||||||
CloseFilter();
|
CloseFilter();
|
||||||
|
mutex.lock();
|
||||||
|
|
||||||
const AudioFormat filter_audio_format =
|
const AudioFormat filter_audio_format =
|
||||||
OpenFilter(in_audio_format, error);
|
OpenFilter(in_audio_format, error);
|
||||||
if (!filter_audio_format.IsDefined() ||
|
if (!filter_audio_format.IsDefined() ||
|
||||||
|
Loading…
Reference in New Issue
Block a user