From 02f12de1c25789913b72c98c5bda3d521ede7b8b Mon Sep 17 00:00:00 2001 From: Sebastien Zwickert Date: Tue, 14 Aug 2012 21:22:20 +0200 Subject: [PATCH] vda: better frame allocation. --- 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 78a32245da..ec5a371267 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;