aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-05 18:20:43 +0100
committerMax Kellermann <max@duempel.org>2009-03-05 18:20:43 +0100
commitb0fcce65d8c9fdee9d1b3fb195ce566fbcbb7605 (patch)
tree5f9de0c81149f463d7c280d9af2b90bdb1ba7bd9 /src/decoder
parentefd606337e7ee4ca2ee017b0197c9245d8fd333d (diff)
downloadmpd-b0fcce65d8c9fdee9d1b3fb195ce566fbcbb7605.tar.gz
mpd-b0fcce65d8c9fdee9d1b3fb195ce566fbcbb7605.tar.xz
mpd-b0fcce65d8c9fdee9d1b3fb195ce566fbcbb7605.zip
flac: explicitly check for STOP command
After the decoder command was obtained, don't wait until libflac detects EOF (as a side effect), quit the decoder immediately. This check was missing completely.
Diffstat (limited to '')
-rw-r--r--src/decoder/flac_plugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index 4308f025f..5bcde5421 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -363,7 +363,8 @@ flac_decode_internal(struct decoder * decoder,
decoder_command_finished(decoder);
} else
decoder_seek_error(decoder);
- } else if (flac_get_state(flac_dec) == flac_decoder_eof)
+ } else if (cmd == DECODE_COMMAND_STOP ||
+ flac_get_state(flac_dec) == flac_decoder_eof)
break;
if (!flac_process_single(flac_dec)) {