aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-02 20:20:14 +0100
committerMax Kellermann <max@duempel.org>2009-11-02 20:20:14 +0100
commit55e3aa81791f90589b9fd5fcef2daadcf72fa8b1 (patch)
tree5126e1bdd4af2465d029c5dc6226ee89f73e3174 /src
parent408d52fe3995a34fe1559074fdabedd7589d512c (diff)
downloadmpd-55e3aa81791f90589b9fd5fcef2daadcf72fa8b1.tar.gz
mpd-55e3aa81791f90589b9fd5fcef2daadcf72fa8b1.tar.xz
mpd-55e3aa81791f90589b9fd5fcef2daadcf72fa8b1.zip
output_thread: return from ao_play() if chunk->next is NULL
When the "next" chunk to be played is NULL, return from ao_play() immediately, without going over the "while" loop (no-op).
Diffstat (limited to '')
-rw-r--r--src/output_thread.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index 502599cb9..39b644e38 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -332,12 +332,11 @@ ao_play(struct audio_output *ao)
if (chunk != NULL)
/* continue the previous play() call */
chunk = chunk->next;
- else {
+ else
chunk = music_pipe_peek(ao->pipe);
- if (chunk == NULL)
- /* no chunk available */
- return false;
- }
+ if (chunk == NULL)
+ /* no chunk available */
+ return false;
ao->chunk_finished = false;