mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00: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:
parent
0a6db2a25a
commit
42da8ea8e8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user