[FFmpeg-cvslog] vda: better frame allocation.

Sebastien Zwickert git at videolan.org
Wed Aug 15 00:54:35 CEST 2012


ffmpeg | branch: master | Sebastien Zwickert <dilaroga at gmail.com> | Tue Aug 14 21:22:20 2012 +0200| [02f12de1c25789913b72c98c5bda3d521ede7b8b] | committer: Sebastien Zwickert

vda: better frame allocation.

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

 libavcodec/vda_h264.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 78a3224..ec5a371 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -144,8 +144,7 @@ static void vda_decoder_callback (void *vda_hw_ctx,
         vda_frame *new_frame;
         vda_frame *queue_walker;
 
-        new_frame = av_mallocz(sizeof(vda_frame));
-        if (!new_frame)
+        if (!(new_frame = av_mallocz(sizeof(*new_frame))))
             return;
 
         new_frame->next_frame = NULL;



More information about the ffmpeg-cvslog mailing list