diff utils.c @ 11223:a090d10c314f libavcodec

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.
author vitor
date Sat, 20 Feb 2010 18:28:11 +0000
parents 31bdf73a0330
children ee2e050815be
line wrap: on
line diff
--- a/utils.c	Sat Feb 20 15:39:27 2010 +0000
+++ b/utils.c	Sat Feb 20 18:28:11 2010 +0000
@@ -685,6 +685,8 @@
         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--;