From b8aac3f8fc27dbdc503aeb078b4d57f6a5a70266 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 7 Nov 2016 09:25:47 +0100 Subject: [PATCH] output/Thread: catch and log send_tag() exceptions --- src/output/OutputThread.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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::FromVoid(ao_filter_chunk(this, chunk));