[flac-dev] [PATCH] set decoding status if write callback failed.
Erik de Castro Lopo
mle+la at mega-nerd.com
Wed Jul 13 10:00:50 UTC 2016
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/
More information about the flac-dev
mailing list