decoder/flac: move the SubmitData() call out of the callback

This addresses two problems:

1. the libFLAC write callback had to send an error status to its
caller when SubmitData() returned a command; this disrupted libFLAC
and the resulting command could not be used for anything;

2. the libFLAC function FLAC__stream_decoder_seek_absolute() also
calls the write callback, but its result cannot be used, because
seeking is still in progress, so we lose all data from one FLAC frame.
By moving the SubmitData() call until after CommandFinished(), we
avoid losing this data.  This fixes another part of #113
This commit is contained in:
Max Kellermann
2018-02-17 13:10:04 +01:00
parent b53a23b51b
commit 026aef7465
4 changed files with 36 additions and 21 deletions

2
NEWS
View File

@@ -1,4 +1,6 @@
ver 0.20.18 (not yet released)
* decoder
- flac: improve seeking precision
* fix gapless CUE song transitions
ver 0.20.17 (2018/02/11)