[FFmpeg-cvslog] avcodec/utils: implement avcodec_alloc_frame() through av_alloc_frame()

Michael Niedermayer git at videolan.org
Tue Dec 17 14:40:56 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 17 14:03:38 2013 +0100| [5abdda214df53f009434f19b9eb8e1375f2924d9] | committer: Michael Niedermayer

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 <michaelni at gmx.at>

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

 libavcodec/utils.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d738a86..972de72 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)



More information about the ffmpeg-cvslog mailing list