[FFmpeg-cvslog] avcodec/options-test: don't alloc avctx->coded_frame

James Almer git at videolan.org
Tue Jul 21 18:04:24 CEST 2015


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jul 21 00:28:57 2015 -0300| [3e46c7dbbeb02bdbcc8813440ca570a5f9eeba48] | committer: James Almer

avcodec/options-test: don't alloc avctx->coded_frame

It's done automatically by avcodec_open2() now.
Fixes memleaks in fate-libavcodec-options.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/options.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 41471de..63a03ac 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -318,7 +318,6 @@ static int dummy_init(AVCodecContext *ctx)
     //TODO: this code should set every possible pointer that could be set by codec and is not an option;
     ctx->extradata_size = 8;
     ctx->extradata = av_malloc(ctx->extradata_size);
-    ctx->coded_frame = av_frame_alloc();
     return 0;
 }
 
@@ -326,7 +325,6 @@ static int dummy_close(AVCodecContext *ctx)
 {
     av_freep(&ctx->extradata);
     ctx->extradata_size = 0;
-    av_frame_free(&ctx->coded_frame);
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list