From 7aa78d9b4a6f301822a20243f30fbaf0561fd411 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:11:51 +0000 Subject: 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 --- src/decode.c | 7 ++----- 1 file 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; } } -- cgit v1.2.3