diff --git a/src/output/Filtered.cxx b/src/output/Filtered.cxx index 43c9ef114..6a0fedb49 100644 --- a/src/output/Filtered.cxx +++ b/src/output/Filtered.cxx @@ -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();