aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
commit62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca (patch)
tree565dd0a8c2c50a31dac369408e6b499eb7daafb5 /src/player_thread.c
parentd29bad441066919f808c4ad1657bc5600fd9bd45 (diff)
downloadmpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.gz
mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.xz
mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.zip
decoder: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
Diffstat (limited to '')
-rw-r--r--src/player_thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 48702b6a3..0c2407eac 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -105,10 +105,10 @@ static int waitOnDecode(struct player *player)
return 0;
}
-static int decodeSeek(struct player *player)
+static bool decodeSeek(struct player *player)
{
- int ret = -1;
double where;
+ bool ret;
if (decoder_current_song() != pc.next_song) {
dc_stop(&pc.notify);
@@ -125,7 +125,7 @@ static int decodeSeek(struct player *player)
where = 0.0;
ret = dc_seek(&pc.notify, where);
- if (ret == 0)
+ if (ret)
pc.elapsedTime = where;
player_command_finished();
@@ -173,7 +173,7 @@ static void processDecodeInput(struct player *player)
case PLAYER_COMMAND_SEEK:
dropBufferedAudio();
- if (decodeSeek(player) == 0) {
+ if (decodeSeek(player)) {
player->xfade = XFADE_UNKNOWN;
/* abort buffering when the user has requested