decoder: ignore the SEEK command during startup

While waiting for the input stream to become ready, ignore all
commands except STOP.  This fixes seeking errors with (remote) songs
which the decoder has already finished.
This commit is contained in:
Max Kellermann 2008-11-20 21:08:16 +01:00
parent 927bf45f84
commit 61ba50a9bc

View File

@ -109,7 +109,7 @@ static void decoder_run(void)
will be available then */
while (!input_stream.ready) {
if (dc.command != DECODE_COMMAND_NONE) {
if (dc.command == DECODE_COMMAND_STOP) {
input_stream_close(&input_stream);
dc.state = DECODE_STATE_STOP;
return;