Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2017-11-05 17:48:41 +01:00
5 changed files with 63 additions and 12 deletions

View File

@@ -245,16 +245,15 @@ try {
inline bool
AudioOutputControl::PlayChunk() noexcept
{
if (tags) {
const auto *tag = source.ReadTag();
if (tag != nullptr) {
const ScopeUnlock unlock(mutex);
try {
output->SendTag(*tag);
} catch (const std::runtime_error &e) {
FormatError(e, "Failed to send tag to %s",
GetLogName());
}
// ensure pending tags are flushed in all cases
const auto *tag = source.ReadTag();
if (tags && tag != nullptr) {
const ScopeUnlock unlock(mutex);
try {
output->SendTag(*tag);
} catch (const std::runtime_error &e) {
FormatError(e, "Failed to send tag to %s",
GetLogName());
}
}