# HG changeset patch # User cehoyos # Date 1279482804 0 # Node ID fb3fcaf3c1b66ab53282220eb6c77892f31ab731 # Parent fb2f04f70afea398d812c99759ae90637b23be86 Fix memleak when using mp*float decoder. Patch by flybird2k at gmail diff -r fb2f04f70afe -r fb3fcaf3c1b6 mpegaudiodec_float.c --- a/mpegaudiodec_float.c Sun Jul 18 08:03:35 2010 +0000 +++ b/mpegaudiodec_float.c Sun Jul 18 19:53:24 2010 +0000 @@ -80,6 +80,13 @@ } } +static av_cold int decode_end(AVCodecContext * avctx) +{ + MPADecodeContext *s = avctx->priv_data; + ff_dct_end(&s->dct); + return 0; +} + #if CONFIG_MP1FLOAT_DECODER AVCodec mp1float_decoder = { @@ -89,7 +96,7 @@ sizeof(MPADecodeContext), decode_init, NULL, - NULL, + decode_end, decode_frame, CODEC_CAP_PARSE_ONLY, .flush= flush, @@ -105,7 +112,7 @@ sizeof(MPADecodeContext), decode_init, NULL, - NULL, + decode_end, decode_frame, CODEC_CAP_PARSE_ONLY, .flush= flush, @@ -121,7 +128,7 @@ sizeof(MPADecodeContext), decode_init, NULL, - NULL, + decode_end, decode_frame, CODEC_CAP_PARSE_ONLY, .flush= flush, @@ -137,7 +144,7 @@ sizeof(MPADecodeContext), decode_init, NULL, - NULL, + decode_end, decode_frame_adu, CODEC_CAP_PARSE_ONLY, .flush= flush,