aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-13 14:43:19 +0100
committerMax Kellermann <max@duempel.org>2008-11-13 14:43:19 +0100
commit7b7340f703c80b1906fb49473878b7ac59997db4 (patch)
tree26d23d733f6d47d5186c66464dc0ca9054d3fd0a
parent2dacd16b5b80f03bcb9dfda819b6796cc1ca674e (diff)
downloadmpd-7b7340f703c80b1906fb49473878b7ac59997db4.tar.gz
mpd-7b7340f703c80b1906fb49473878b7ac59997db4.tar.xz
mpd-7b7340f703c80b1906fb49473878b7ac59997db4.zip
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.
Diffstat (limited to '')
-rw-r--r--src/decoder/mp3_plugin.c8
1 files changed, 3 insertions, 5 deletions
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) {