Commit fae23a51 authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

simplified some code in decode.c

The block after "if" breaks out of the loop. To make the code a little bit more readable, don't write the rest in an "else" block, since this code path does not break. git-svn-id: https://svn.musicpd.org/mpd/trunk@7251 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent a7b19012
......@@ -546,18 +546,17 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
if (pc->queueState != PLAYER_QUEUE_PLAY) {
quit = 1;
break;
} else {
next = -1;
if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) <
0) {
return;
}
nextChunk = -1;
doCrossFade = 0;
crossFadeChunks = 0;
pc->queueState = PLAYER_QUEUE_EMPTY;
wakeup_main_task();
}
next = -1;
if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < 0)
return;
nextChunk = -1;
doCrossFade = 0;
crossFadeChunks = 0;
pc->queueState = PLAYER_QUEUE_EMPTY;
wakeup_main_task();
} else if (dc->state == DECODE_STATE_STOP && !dc->start) {
quit = 1;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment