diff options
author | Max Kellermann <max@duempel.org> | 2008-11-02 20:14:55 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-02 20:14:55 +0100 |
commit | cc164cc88402bef67b9c12f93fb223450834cc2d (patch) | |
tree | a565be78119aab548822528a63e60d53407cd77e | |
parent | e5137706d18ba4d42a57bf90b4d1b9d97af1ecf8 (diff) | |
download | mpd-cc164cc88402bef67b9c12f93fb223450834cc2d.tar.gz mpd-cc164cc88402bef67b9c12f93fb223450834cc2d.tar.xz mpd-cc164cc88402bef67b9c12f93fb223450834cc2d.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/player_thread.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |