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

Michael Niedermayer git at videolan.org
Tue Jan 7 21:35:28 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 17 14:03:38 2013 +0100| [304260a5722f45a99e26788ed5475a1fda6cfc17] | 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>
(cherry picked from commit 5abdda214df53f009434f19b9eb8e1375f2924d9)

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

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

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

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 554b30e..c0f47cb 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1071,15 +1071,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