output/Thread: catch and log send_tag() exceptions

This commit is contained in:
Max Kellermann 2016-11-07 09:25:47 +01:00
parent 4aab97ccb1
commit b8aac3f8fc

View File

@ -473,7 +473,12 @@ AudioOutput::PlayChunk(const MusicChunk *chunk)
if (tags && gcc_unlikely(chunk->tag != nullptr)) { if (tags && gcc_unlikely(chunk->tag != nullptr)) {
const ScopeUnlock unlock(mutex); const ScopeUnlock unlock(mutex);
try {
ao_plugin_send_tag(this, *chunk->tag); 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)); auto data = ConstBuffer<char>::FromVoid(ao_filter_chunk(this, chunk));