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
|
void
|
||||||
FilteredAudioOutput::CloseOutput(bool drain) noexcept
|
FilteredAudioOutput::CloseOutput(bool drain) noexcept
|
||||||
{
|
{
|
||||||
if (drain)
|
if (drain) {
|
||||||
|
try {
|
||||||
Drain();
|
Drain();
|
||||||
else
|
} catch (...) {
|
||||||
|
FormatError(std::current_exception(),
|
||||||
|
"Failed to drain %s", GetLogName());
|
||||||
|
}
|
||||||
|
} else
|
||||||
Cancel();
|
Cancel();
|
||||||
|
|
||||||
output->Close();
|
output->Close();
|
||||||
|
Loading…
Reference in New Issue
Block a user