summaryrefslogtreecommitdiffstats
path: root/libavcodec/vda.c
diff options
context:
space:
mode:
authorSebastien Zwickert <dilaroga@free.fr>2011-11-14 21:56:16 +0100
committerSebastien Zwickert <dilaroga@free.fr>2011-11-14 22:24:03 +0100
commit4590e161e6761cbb9fcaab7b3d216cb2b7ae0132 (patch)
treeaf2c17daf9ee01fd81d7b29ee8b3e4cbcce83f68 /libavcodec/vda.c
parentc7fa3eeab97e5b6a2de63f24bcbfb57ea81c5c60 (diff)
downloadffmpeg-streaming-4590e161e6761cbb9fcaab7b3d216cb2b7ae0132.zip
ffmpeg-streaming-4590e161e6761cbb9fcaab7b3d216cb2b7ae0132.tar.gz
vda: check allocation result.
Diffstat (limited to 'libavcodec/vda.c')
-rw-r--r--libavcodec/vda.c3
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);
OpenPOWER on IntegriCloud