aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-11-05 18:34:06 +0100
committerMax Kellermann <max@duempel.org>2010-11-05 18:40:23 +0100
commitc594afeee70b29cc88e337a3b8fbd2a39ac37822 (patch)
tree0823a21db5b09023f5ffa296c464f099f627916a /src/player_thread.c
parent32d10eedbde70ef3d5ae0f1567cee3e25e4f9993 (diff)
downloadmpd-c594afeee70b29cc88e337a3b8fbd2a39ac37822.tar.gz
mpd-c594afeee70b29cc88e337a3b8fbd2a39ac37822.tar.xz
mpd-c594afeee70b29cc88e337a3b8fbd2a39ac37822.zip
pipe: add helper function music_pipe_empty()
Diffstat (limited to '')
-rw-r--r--src/player_thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index e2c9b6f93..18b8121a9 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -736,7 +736,7 @@ static void do_play(void)
if (player.paused)
notify_wait(&pc.notify);
- else if (music_pipe_size(player.pipe) > 0) {
+ else if (!music_pipe_empty(player.pipe)) {
/* at least one music chunk is ready - send it
to the audio output */
@@ -757,7 +757,7 @@ static void do_play(void)
/* check the size of the pipe again, because
the decoder thread may have added something
since we last checked */
- if (music_pipe_size(player.pipe) == 0)
+ if (music_pipe_empty(player.pipe))
break;
} else {
/* the decoder is too busy and hasn't provided