aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorMax Kellerman <max@duempel.org>2008-06-01 22:24:35 +0000
committerEric Wong <normalperson@yhbt.net>2008-06-01 22:24:35 +0000
commite0be3aad20f9b4c95af047e0e64aa01a7a972886 (patch)
treeb4762050d837eeb8838667627b1adfaf0d4264ed /src/decode.c
parent3c3620b3011f5b52128873a273728587f6a702ec (diff)
downloadmpd-e0be3aad20f9b4c95af047e0e64aa01a7a972886.tar.gz
mpd-e0be3aad20f9b4c95af047e0e64aa01a7a972886.tar.xz
mpd-e0be3aad20f9b4c95af047e0e64aa01a7a972886.zip
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
Diffstat (limited to '')
-rw-r--r--src/decode.c3
1 files changed, 2 insertions, 1 deletions
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 {