Commit 1c60c8e0 authored by Max Kellermann's avatar Max Kellermann

output/Filtered: catch Drain() exceptions in CloseOutput()

parent eddda959
......@@ -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();
......
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