diff options
author | Sebastien Zwickert <dilaroga@gmail.com> | 2012-08-14 21:22:20 +0200 |
---|---|---|
committer | Sebastien Zwickert <dilaroga@gmail.com> | 2012-08-14 21:22:20 +0200 |
commit | 02f12de1c25789913b72c98c5bda3d521ede7b8b (patch) | |
tree | 1d21879320bc9fd1504378816975176eef9e9140 | |
parent | 70f0ffa1ed456fd0b560d0dd1d0d93f1ba3a6d93 (diff) | |
download | ffmpeg-streaming-02f12de1c25789913b72c98c5bda3d521ede7b8b.zip ffmpeg-streaming-02f12de1c25789913b72c98c5bda3d521ede7b8b.tar.gz |
vda: better frame allocation.
-rw-r--r-- | libavcodec/vda_h264.c | 3 |
1 files changed, 1 insertions, 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; |