Commit 7aa78d9b authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

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
parent fae23a51
...@@ -543,10 +543,8 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * ...@@ -543,10 +543,8 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
processDecodeInput(); processDecodeInput();
player_sleep(); player_sleep();
} }
if (pc->queueState != PLAYER_QUEUE_PLAY) { if (pc->queueState != PLAYER_QUEUE_PLAY)
quit = 1;
break; break;
}
next = -1; next = -1;
if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < 0) if (waitOnDecode(pc, dc, cb, &decodeWaitedOn) < 0)
...@@ -558,12 +556,11 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * ...@@ -558,12 +556,11 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
pc->queueState = PLAYER_QUEUE_EMPTY; pc->queueState = PLAYER_QUEUE_EMPTY;
wakeup_main_task(); wakeup_main_task();
} else if (dc->state == DECODE_STATE_STOP && !dc->start) { } else if (dc->state == DECODE_STATE_STOP && !dc->start) {
quit = 1;
break; break;
} else { } else {
/*DEBUG("waiting for decoded audio, play silence\n");*/ /*DEBUG("waiting for decoded audio, play silence\n");*/
if (playAudio(silence, CHUNK_SIZE) < 0) if (playAudio(silence, CHUNK_SIZE) < 0)
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