output/Thread: catch Pause() exceptions

This commit is contained in:
Max Kellermann 2016-11-02 10:53:15 +01:00
parent e2b7c30811
commit 8b3d934230
1 changed files with 5 additions and 1 deletions

View File

@ -597,9 +597,13 @@ AudioOutput::Pause()
break;
bool success;
{
try {
const ScopeUnlock unlock(mutex);
success = ao_plugin_pause(this);
} catch (const std::runtime_error &e) {
FormatError(e, "\"%s\" [%s] failed to pause",
name, plugin.name);
success = false;
}
if (!success) {