output/Interface: allow Pause() to throw exception
Coverity discovered that the Pulse plugin could throw exceptions from Pause(), but that method was marked "noexcept" because its caller was not designed to catch exceptions. So instead of avoiding exceptions (by catching and logging them in each and every implementation), let's allow them, and do the catch/log game in the MPD core.
This commit is contained in:
@@ -135,7 +135,7 @@ struct JackOutput final : AudioOutput {
|
||||
|
||||
size_t Play(const void *chunk, size_t size) override;
|
||||
|
||||
bool Pause() noexcept override;
|
||||
bool Pause() override;
|
||||
};
|
||||
|
||||
static constexpr Domain jack_output_domain("jack_output");
|
||||
@@ -661,7 +661,7 @@ JackOutput::Play(const void *chunk, size_t size)
|
||||
}
|
||||
|
||||
inline bool
|
||||
JackOutput::Pause() noexcept
|
||||
JackOutput::Pause()
|
||||
{
|
||||
if (shutdown)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user