Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-05-20 18:49:20 +0400
committerDiego Biurrun <diego@biurrun.de>2011-05-20 20:24:53 +0400
commit42da8ea8e848e65611f0c606cd2c96d3a70c041d (patch)
treeacdd4634fa76efecd15fb1c122bf384d3a3d9bc4 /libavcodec/aacdec.c
parent0a6db2a25a70e3e8fb414e361719152a9e7e9766 (diff)
LATM/AAC: Free previously initialized context on reinit.
Fixes memory leaks which are the result of overwriting already-initialized MDCT contexts during context reinitialization, e.g. in valgrind fate-aac-latm_000000001180bc60. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index f2d50f4aba..fbb3582661 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2464,6 +2464,7 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size,
*out_size = 0;
return avpkt->size;
} else {
+ aac_decode_close(avctx);
if ((err = aac_decode_init(avctx)) < 0)
return err;
latmctx->initialized = 1;