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) ...@@ -124,9 +124,14 @@ FilteredAudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
void void
FilteredAudioOutput::CloseOutput(bool drain) noexcept FilteredAudioOutput::CloseOutput(bool drain) noexcept
{ {
if (drain) if (drain) {
Drain(); try {
else Drain();
} catch (...) {
FormatError(std::current_exception(),
"Failed to drain %s", GetLogName());
}
} else
Cancel(); Cancel();
output->Close(); 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