output/Filtered: catch Drain() exceptions in CloseOutput()
This commit is contained in:
		| @@ -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(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann