[FFmpeg-cvslog] frwu: check if allocation was successful

Paul B Mahol git at videolan.org
Sat Jan 28 08:04:56 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jan 27 01:13:48 2012 +0000| [5eda82aac9b400f0435293db9b102bd4e9749a7b] | committer: Ronald S. Bultje

frwu: check if allocation was successful

Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

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

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

diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c
index 061c460..eba0530 100644
--- a/libavcodec/frwu.c
+++ b/libavcodec/frwu.c
@@ -33,6 +33,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     avctx->pix_fmt = PIX_FMT_UYVY422;
 
     avctx->coded_frame = avcodec_alloc_frame();
+    if (!avctx->coded_frame)
+        return AVERROR(ENOMEM);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list