mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
c303ad85a9
commit
3e46c7dbbe
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user