lvqcl
2016-Jul-10 08:41 UTC
[flac-dev] [PATCH] set decoding status if write callback failed.
Open src/flac/decode.c, find write_callback() function and add return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; to the beginning of the function. Decoding will fail with the following message: test.flac: ERROR while decoding data state = FLAC__STREAM_DECODER_READ_FRAME As you can see, decoder state isn't quite correct. One of the ways to fix this is in the attached patch. After the patch flac writes: test.flac: ERROR while decoding data state = FLAC__STREAM_DECODER_ABORTED which is more logical. -------------- next part -------------- A non-text attachment was scrubbed... Name: set_decoding_status.patch Type: application/octet-stream Size: 1333 bytes Desc: not available URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20160710/ce29070d/attachment.obj>
Erik de Castro Lopo
2016-Jul-13 10:00 UTC
[flac-dev] [PATCH] set decoding status if write callback failed.
lvqcl wrote:> Open src/flac/decode.c, find write_callback() function and add > > return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; > > to the beginning of the function. Decoding will fail with > the following message: > > test.flac: ERROR while decoding data > state = FLAC__STREAM_DECODER_READ_FRAME > > As you can see, decoder state isn't quite correct. > > One of the ways to fix this is in the attached patch. > After the patch flac writes: > > test.flac: ERROR while decoding data > state = FLAC__STREAM_DECODER_ABORTED > > which is more logical.Applied. Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/