From e0be3aad20f9b4c95af047e0e64aa01a7a972886 Mon Sep 17 00:00:00 2001 From: Max Kellerman Date: Sun, 1 Jun 2008 22:24:35 +0000 Subject: assert dc.state == DECODE_STATE_STOP During the decoder thread main loop, dc.state must be DECODE_STATE_STOP. Explicitly assigning it after the "dc.stop" check is redundant. git-svn-id: https://svn.musicpd.org/mpd/trunk@7366 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/decode.c b/src/decode.c index 297f6110d..96a84b21a 100644 --- a/src/decode.c +++ b/src/decode.c @@ -325,10 +325,11 @@ static void * decoder_task(mpd_unused void *arg) notifyEnter(&dc.notify); while (1) { + assert(dc.state == DECODE_STATE_STOP); + if (dc.start || dc.seek) { decodeStart(); } else if (dc.stop) { - dc.state = DECODE_STATE_STOP; dc.stop = 0; decoder_wakeup_player(); } else { -- cgit v1.2.3