From 5abdda214df53f009434f19b9eb8e1375f2924d9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 17 Dec 2013 14:03:38 +0100 Subject: [PATCH] avcodec/utils: implement avcodec_alloc_frame() through av_alloc_frame() This ensures that theres just one AVFrame allocation function and libs dont produce multiple AVFrame variants after a minor lib update Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d738a865ab..972de726bb 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1067,15 +1067,7 @@ void avcodec_get_frame_defaults(AVFrame *frame) AVFrame *avcodec_alloc_frame(void) { - AVFrame *frame = av_malloc(sizeof(AVFrame)); - - if (frame == NULL) - return NULL; - - frame->extended_data = NULL; - avcodec_get_frame_defaults(frame); - - return frame; + return av_frame_alloc(); } void avcodec_free_frame(AVFrame **frame)