[FFmpeg-cvslog] avcodec/asvenc: remove code allocating dummy coded_frame

Michael Niedermayer git at videolan.org
Mon Nov 18 23:29:38 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 18 23:21:20 2013 +0100| [f0f04fd8429475999bde08943e29a678cab3926e] | committer: Michael Niedermayer

avcodec/asvenc: remove code allocating dummy coded_frame

Fixes memleak

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f0f04fd8429475999bde08943e29a678cab3926e
---

 libavcodec/asvenc.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index 066dbba..dd3d4f5 100644
--- a/libavcodec/asvenc.c
+++ b/libavcodec/asvenc.c
@@ -237,12 +237,6 @@ static av_cold int encode_init(AVCodecContext *avctx){
     int i;
     const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
 
-    avctx->coded_frame = av_frame_alloc();
-    if (!avctx->coded_frame)
-        return AVERROR(ENOMEM);
-    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-    avctx->coded_frame->key_frame = 1;
-
     ff_asv_common_init(avctx);
 
     if(avctx->global_quality == 0) avctx->global_quality= 4*FF_QUALITY_SCALE;



More information about the ffmpeg-cvslog mailing list