From cc164cc88402bef67b9c12f93fb223450834cc2d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Nov 2008 20:14:55 +0100 Subject: [PATCH] player: don't play empty chunks An empty chunk may happen when it only contains a tag, but no PCM data. Don't call playAudio() then. --- src/player_thread.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/player_thread.c b/src/player_thread.c index f0c25a694..e1f31b38c 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -236,6 +236,9 @@ playChunk(struct song *song, struct music_chunk *chunk, } } + if (chunk->length == 0) + return 0; + pcm_volume(chunk->data, chunk->length, format, pc.softwareVolume);