output/Filtered: catch Drain() exceptions in CloseOutput()
This commit is contained in:
parent
eddda95900
commit
1c60c8e014
@ -124,9 +124,14 @@ FilteredAudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
|
||||
void
|
||||
FilteredAudioOutput::CloseOutput(bool drain) noexcept
|
||||
{
|
||||
if (drain)
|
||||
Drain();
|
||||
else
|
||||
if (drain) {
|
||||
try {
|
||||
Drain();
|
||||
} catch (...) {
|
||||
FormatError(std::current_exception(),
|
||||
"Failed to drain %s", GetLogName());
|
||||
}
|
||||
} else
|
||||
Cancel();
|
||||
|
||||
output->Close();
|
||||
|
Loading…
Reference in New Issue
Block a user