From fc9014f7ecb486288b8f7d0d376f68b27f60dd6f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 10 Oct 2013 23:12:27 -0400 Subject: [PATCH] PlayerThread: Only drop 0 length packets without tags Fixes a regression from 752dfb3d95482c562e5d24c6ea839c4815de9a6d which caused the current chunk to be flushed as soon as new replaygain information was found. If this occurs on a tag chunk, it has no data (length 0) and is then skipped before pushing it to all of the outputs. This change allows 0-length chunks through if they contain a tag and they are now appearing in mplayer and mpv properly. --- src/PlayerThread.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index 6e5231052..f3db5507d 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -724,7 +724,7 @@ play_chunk(player_control &pc, if (chunk->tag != nullptr) update_song_tag(song, *chunk->tag); - if (chunk->length == 0) { + if (chunk->IsEmpty()) { buffer.Return(chunk); return true; }