diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/output/OutputThread.cxx | 19 |
2 files changed, 11 insertions, 10 deletions
@@ -5,6 +5,8 @@ ver 0.20.12 (not yet released) - vorbis: fix Tremor support * player - log message when decoder is too slow +* output + - fix hanging playback with soxr resampler ver 0.20.11 (2017/10/18) * storage diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index c2ee2ccfc..d3f9c2bb8 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -271,16 +271,15 @@ try { inline bool AudioOutput::PlayChunk() { - if (tags) { - const auto *tag = source.ReadTag(); - if (tag != nullptr) { - const ScopeUnlock unlock(mutex); - try { - ao_plugin_send_tag(this, *tag); - } catch (const std::runtime_error &e) { - FormatError(e, "Failed to send tag to \"%s\" [%s]", - name, plugin.name); - } + // ensure pending tags are flushed in all cases + const auto *tag = source.ReadTag(); + if (tags && tag != nullptr) { + const ScopeUnlock unlock(mutex); + try { + ao_plugin_send_tag(this, *tag); + } catch (const std::runtime_error &e) { + FormatError(e, "Failed to send tag to \"%s\" [%s]", + name, plugin.name); } } |