lib/chromaprint/DecoderClient: catch and postpone InputStream::LockRead() errors

This commit is contained in:
Max Kellermann
2019-07-05 08:36:14 +02:00
parent 8480b834b3
commit 94c9fafe16
3 changed files with 24 additions and 3 deletions

View File

@@ -305,7 +305,12 @@ GetChromaprintCommand::Read(InputStream &is, void *buffer, size_t length)
cond.wait(lock);
}
return is.Read(lock, buffer, length);
try {
return is.Read(lock, buffer, length);
} catch (...) {
ChromaprintDecoderClient::error = std::current_exception();
return 0;
}
}
CommandResult