[Flac-dev] Memory leak

Bastiaan Timmer basjetimmer at yahoo.com
Thu Aug 11 06:39:06 PDT 2011


After some more testing, and reading the source, the finish() is indeed called on the verification decoder when its container encoder is finished. This correctly leaves the decoder in the FLAC__STREAM_DECODER_UNINITIALIZED state, ready to be reinitialized (or return an error).

So, all that needs to be done is check for NULL when the encoder is initialized and not call FLAC__stream_decoder_new() when a decoder is already allocated.

I have submitted a patch on the flac tracker here: https://sourceforge.net/tracker/?func=detail&aid=3390048&group_id=13478&atid=313478

thanks,
Bas Timmer


More information about the Flac-dev mailing list