diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:07 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:07 +0200 |
commit | 17e9cc84c5f94c94c71b2a808b57d4655ee21d12 (patch) | |
tree | fbb3c0e6ac5af307ae7e5a4ca4ca525f904d5740 /src/inputPlugins/wavpack_plugin.c | |
parent | 78c55e24324c881541a87cd0003c60f378a43d68 (diff) | |
download | mpd-17e9cc84c5f94c94c71b2a808b57d4655ee21d12.tar.gz mpd-17e9cc84c5f94c94c71b2a808b57d4655ee21d12.tar.xz mpd-17e9cc84c5f94c94c71b2a808b57d4655ee21d12.zip |
added decoder_seek_where() and decoder_seek_error()
Provide access to seeking for the decoder plugins; they have to know
where to seek, and they need a way to tell us that seeking has failed.
Diffstat (limited to 'src/inputPlugins/wavpack_plugin.c')
-rw-r--r-- | src/inputPlugins/wavpack_plugin.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index 75afb8603..59a482034 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -178,17 +178,16 @@ static void wavpack_decode(struct decoder * decoder, decoder_clear(decoder); - where = dc.seekWhere * + where = decoder_seek_where(decoder) * audio_format.sampleRate; - if (WavpackSeekSample(wpc, where)) + if (WavpackSeekSample(wpc, where)) { position = where; - else - dc.seekError = 1; + decoder_command_finished(decoder); + } else + decoder_seek_error(decoder); } else { - dc.seekError = 1; + decoder_seek_error(decoder); } - - decoder_command_finished(decoder); } if (decoder_get_command(decoder) == DECODE_COMMAND_STOP) |