diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2010-02-20 18:28:11 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2010-02-20 18:28:11 +0000 |
commit | c4f267ab7570a66eea46a231ad10486c63cc4c68 (patch) | |
tree | e6ee0b8c4a0b958a9fd0dbe4cd404d28dce7f9ca /libavcodec/utils.c | |
parent | 7ed63ca2e7817e837facd29b01d25a1a69087916 (diff) | |
download | ffmpeg-c4f267ab7570a66eea46a231ad10486c63cc4c68.tar.gz |
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
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0b0c562deb..a66b85e9ad 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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--; |