aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:11:51 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:11:51 +0000
commit7aa78d9b4a6f301822a20243f30fbaf0561fd411 (patch)
tree82ad2e95f8294f7e307e9f50166e77644b993841 /src/decode.c
parentfae23a511192513439b8643c6801ba7766ef8be0 (diff)
downloadmpd-7aa78d9b4a6f301822a20243f30fbaf0561fd411.tar.gz
mpd-7aa78d9b4a6f301822a20243f30fbaf0561fd411.tar.xz
mpd-7aa78d9b4a6f301822a20243f30fbaf0561fd411.zip
don't set quit=1 before break
Instead of setting quit=1, we can simply break out of the loop. git-svn-id: https://svn.musicpd.org/mpd/trunk@7252 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/decode.c b/src/decode.c
index 386c45a55..fe845f7be 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -543,10 +543,8 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
processDecodeInput();
player_sleep();
}
- if (pc->queueState != PLAYER_QUEUE_PLAY) {
- quit = 1;
+ if (pc->queueState != PLAYER_QUEUE_PLAY)
break;
- }
next = -1;
if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < 0)
@@ -558,12 +556,11 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
pc->queueState = PLAYER_QUEUE_EMPTY;
wakeup_main_task();
} else if (dc->state == DECODE_STATE_STOP && !dc->start) {
- quit = 1;
break;
} else {
/*DEBUG("waiting for decoded audio, play silence\n");*/
if (playAudio(silence, CHUNK_SIZE) < 0)
- quit = 1;
+ break;
}
}