diff options
author | Max Kellermann <max@musicpd.org> | 2016-11-07 09:25:47 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-11-07 09:25:47 +0100 |
commit | b8aac3f8fc27dbdc503aeb078b4d57f6a5a70266 (patch) | |
tree | 33ab363e98bbd1e9b1afd2096f09bd572dc5a566 /src | |
parent | 4aab97ccb140cb098e93de4d67944e2df07c6af7 (diff) |
output/Thread: catch and log send_tag() exceptions
Diffstat (limited to 'src')
-rw-r--r-- | src/output/OutputThread.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index 16774ad37..20a9febb8 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -473,7 +473,12 @@ AudioOutput::PlayChunk(const MusicChunk *chunk) if (tags && gcc_unlikely(chunk->tag != nullptr)) { const ScopeUnlock unlock(mutex); - ao_plugin_send_tag(this, *chunk->tag); + try { + ao_plugin_send_tag(this, *chunk->tag); + } catch (const std::runtime_error &e) { + FormatError(e, "Failed to send tag to \"%s\" [%s]", + name, plugin.name); + } } auto data = ConstBuffer<char>::FromVoid(ao_filter_chunk(this, chunk)); |