Browse Source

Free encoder extradata in avcodec_close(). Should fix several small memory

leaks when encoding (at least for asv, wma and aac).

Fix also issue 1577.

Originally committed as revision 21923 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Vitor Sessak 15 years ago
parent
commit
c4f267ab75
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/utils.c

+ 2
- 0
libavcodec/utils.c View File

@@ -685,6 +685,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->codec->close(avctx);
avcodec_default_free_buffers(avctx);
av_freep(&avctx->priv_data);
if(avctx->codec->encode)
av_freep(&avctx->extradata);
avctx->codec = NULL;
entangled_thread_counter--;



Loading…
Cancel
Save