vda: better frame allocation.
authorSebastien Zwickert <dilaroga@gmail.com>
Tue, 14 Aug 2012 19:22:20 +0000 (21:22 +0200)
committerSebastien Zwickert <dilaroga@gmail.com>
Tue, 14 Aug 2012 19:22:20 +0000 (21:22 +0200)
libavcodec/vda_h264.c

index 78a3224..ec5a371 100644 (file)
@@ -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;