output/Filtered: move try/catch from IteratePause() to caller

This commit is contained in:
Max Kellermann
2020-10-01 20:35:21 +02:00
parent 4ca2c33181
commit c0775d328c
3 changed files with 9 additions and 11 deletions

View File

@@ -338,10 +338,14 @@ AudioOutputControl::InternalPause(std::unique_lock<Mutex> &lock) noexcept
if (!WaitForDelay(lock))
break;
bool success;
{
bool success = false;
try {
const ScopeUnlock unlock(mutex);
success = output->IteratePause();
} catch (...) {
FormatError(std::current_exception(),
"Failed to pause %s",
GetLogName());
}
if (!success) {