Skip to content

Commit 02f12de

Browse files
author
Sebastien Zwickert
committed
vda: better frame allocation.
1 parent 70f0ffa commit 02f12de

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libavcodec/vda_h264.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ static void vda_decoder_callback (void *vda_hw_ctx,
144144
vda_frame *new_frame;
145145
vda_frame *queue_walker;
146146

147-
new_frame = av_mallocz(sizeof(vda_frame));
148-
if (!new_frame)
147+
if (!(new_frame = av_mallocz(sizeof(*new_frame))))
149148
return;
150149

151150
new_frame->next_frame = NULL;

0 commit comments

Comments
 (0)