diff options
author | Max Kellermann <max@duempel.org> | 2008-04-12 04:13:05 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-12 04:13:05 +0000 |
commit | 71b24e095002267e6369eeae21c5139037fb0e93 (patch) | |
tree | d1c95e5176ad2cd682afda0a3fdaae2f55078ae1 /src/decode.c | |
parent | e9b7aae3f070ded65ecc914f0684562bc53a2c56 (diff) | |
download | mpd-71b24e095002267e6369eeae21c5139037fb0e93.tar.gz mpd-71b24e095002267e6369eeae21c5139037fb0e93.tar.xz mpd-71b24e095002267e6369eeae21c5139037fb0e93.zip |
removed "quit"
The variable "quit" can be removed, since its only setter can use
"break" instead, just like the other code paths.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7266 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/decode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/decode.c b/src/decode.c index 96f738bcc..3a73d9ef2 100644 --- a/src/decode.c +++ b/src/decode.c @@ -362,7 +362,6 @@ static void advanceOutputBufferTo(OutputBuffer * cb, int to) static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb) { int pause = 0; - int quit = 0; int buffering = 1; unsigned int bbp = buffered_before_play; /** cross fading enabled for the current song? 0=must check; @@ -387,7 +386,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * pc->play = 0; wakeup_main_task(); - while (!quit) { + while (1) { processDecodeInput(pc, dc, cb, &pause, &bbp, &doCrossFade, &decodeWaitedOn, &next); @@ -546,9 +545,8 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * &(cb->audioFormat), pc->softwareVolume); if (playAudio(cb->chunks + cb->begin * CHUNK_SIZE, - cb->chunkSize[cb->begin]) < 0) { - quit = 1; - } + cb->chunkSize[cb->begin]) < 0) + break; pc->totalPlayTime += sizeToTime * cb->chunkSize[cb->begin]; if ((unsigned)cb->begin + 1 >= buffered_chunks) { |