Commit 7b4305d8 authored by Max Kellermann's avatar Max Kellermann

decoder/wavpack: seek errors are fatal

The libWavPack documentation says: "After a FALSE return the file should not be accessed again (other than to close it); this is a fatal error."
parent 94e9e93f
...@@ -217,12 +217,13 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek) ...@@ -217,12 +217,13 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek)
if (cmd == DecoderCommand::SEEK) { if (cmd == DecoderCommand::SEEK) {
if (can_seek) { if (can_seek) {
auto where = client.GetSeekFrame(); auto where = client.GetSeekFrame();
if (!WavpackSeekSample(wpc, where)) {
if (WavpackSeekSample(wpc, where)) { /* seek errors are fatal */
client.CommandFinished();
} else {
client.SeekError(); client.SeekError();
break;
} }
client.CommandFinished();
} else { } else {
client.SeekError(); client.SeekError();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment