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
This commit is contained in:
parent
fae23a5111
commit
7aa78d9b4a
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user