Browse Source

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>
tags/n0.8
Ronald S. Bultje Diego Biurrun 14 years ago
parent
commit
42da8ea8e8
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/aacdec.c

+ 1
- 0
libavcodec/aacdec.c 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;


Loading…
Cancel
Save