output/Thread: ensure pending tags are flushed in all cases
Fixes hanging playback with soxr resampler. Closes #139, #141
This commit is contained in:

committed by
Max Kellermann

parent
3b23cf0258
commit
b111a8fe8d
2
NEWS
2
NEWS
@@ -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
|
||||
|
@@ -271,9 +271,9 @@ try {
|
||||
inline bool
|
||||
AudioOutput::PlayChunk()
|
||||
{
|
||||
if (tags) {
|
||||
// ensure pending tags are flushed in all cases
|
||||
const auto *tag = source.ReadTag();
|
||||
if (tag != nullptr) {
|
||||
if (tags && tag != nullptr) {
|
||||
const ScopeUnlock unlock(mutex);
|
||||
try {
|
||||
ao_plugin_send_tag(this, *tag);
|
||||
@@ -282,7 +282,6 @@ AudioOutput::PlayChunk()
|
||||
name, plugin.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (command == Command::NONE) {
|
||||
const auto data = source.PeekData();
|
||||
|
Reference in New Issue
Block a user