1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Ronald S. Bultje 2011-05-20 10:49:20 -04:00 committed by Diego Biurrun
parent 0a6db2a25a
commit 42da8ea8e8

View File

@ -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;