decoder/wavpack: use integer seek times

This commit is contained in:
Max Kellermann 2014-08-26 11:39:58 +02:00
parent 2052a029ee
commit f64da46a98

View File

@ -177,8 +177,7 @@ wavpack_decode(Decoder &decoder, WavpackContext *wpc, bool can_seek)
while (cmd != DecoderCommand::STOP) {
if (cmd == DecoderCommand::SEEK) {
if (can_seek) {
unsigned where = decoder_seek_where(decoder) *
audio_format.sample_rate;
auto where = decoder_seek_where_frame(decoder);
if (WavpackSeekSample(wpc, where)) {
decoder_command_finished(decoder);