[SCM] libav/experimental: Free encoder extradata in avcodec_close(). Should fix several small memory leaks when encoding (at least for asv, wma and aac).

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:00:42 UTC 2013


The following commit has been merged in the experimental branch:
commit c4f267ab7570a66eea46a231ad10486c63cc4c68
Author: Vitor Sessak <vitor1001 at gmail.com>
Date:   Sat Feb 20 18:28:11 2010 +0000

    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

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0b0c562..a66b85e 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--;
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list