From 7b7340f703c80b1906fb49473878b7ac59997db4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 13 Nov 2008 14:43:19 +0100 Subject: mp3: fix SEEK command check after mp3_synth_and_send() mp3 seeking was broken, because the command==SEEK check was never reached. Swap the command check order (==SEEK before !=NONE) to fix that. --- src/decoder/mp3_plugin.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/decoder/mp3_plugin.c b/src/decoder/mp3_plugin.c index 2b39a4162..69cc7d0f6 100644 --- a/src/decoder/mp3_plugin.c +++ b/src/decoder/mp3_plugin.c @@ -994,10 +994,7 @@ mp3_read(struct mp3_data *data, struct replay_gain_info **replay_gain_info_r) cmd = mp3_synth_and_send(data, replay_gain_info_r != NULL ? *replay_gain_info_r : NULL); - if (cmd != DECODE_COMMAND_NONE) - return false; - - if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) { + if (cmd == DECODE_COMMAND_SEEK) { unsigned long j; assert(data->input_stream->seekable); @@ -1015,7 +1012,8 @@ mp3_read(struct mp3_data *data, struct replay_gain_info **replay_gain_info_r) data->mute_frame = MUTEFRAME_SEEK; decoder_command_finished(decoder); } - } + } else if (cmd != DECODE_COMMAND_NONE) + return false; } while (true) { -- cgit v1.2.3