Mercurial > libavcodec.hg
changeset 12187:fb3fcaf3c1b6 libavcodec
Fix memleak when using mp*float decoder.
Patch by flybird2k at gmail
author | cehoyos |
---|---|
date | Sun, 18 Jul 2010 19:53:24 +0000 |
parents | fb2f04f70afe |
children | 6f064ab48463 |
files | mpegaudiodec_float.c |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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,