[FFmpeg-cvslog] vda: check allocation result.

Sebastien Zwickert git at videolan.org
Mon Nov 14 23:23:23 CET 2011


ffmpeg | branch: master | Sebastien Zwickert <dilaroga at free.fr> | Mon Nov 14 21:56:16 2011 +0100| [4590e161e6761cbb9fcaab7b3d216cb2b7ae0132] | committer: Sebastien Zwickert

vda: check allocation result.

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

 libavcodec/vda.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/vda.c b/libavcodec/vda.c
index 4675e0b..ade961e 100644
--- a/libavcodec/vda.c
+++ b/libavcodec/vda.c
@@ -125,6 +125,9 @@ static void vda_decoder_callback (void *vda_hw_ctx,
         return;
 
     new_frame = av_mallocz(sizeof(vda_frame));
+    if (!new_frame)
+        return;
+
     new_frame->next_frame = NULL;
     new_frame->cv_buffer = CVPixelBufferRetain(image_buffer);
     new_frame->pts = vda_pts_from_dictionary(user_info);



More information about the ffmpeg-cvslog mailing list