[FFmpeg-cvslog] v210dec: check for coded_frame allocation failure

Paul B Mahol git at videolan.org
Tue Feb 7 02:02:59 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Feb  5 21:14:39 2012 +0000| [3cc0353f8d4eaa4862450bbe517e7fcf8be4f2bd] | committer: Anton Khirnov

v210dec: check for coded_frame allocation failure

Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

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

diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 37b4a3c..d464572 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -34,6 +34,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     avctx->bits_per_raw_sample = 10;
 
     avctx->coded_frame         = avcodec_alloc_frame();
+    if (!avctx->coded_frame)
+        return AVERROR(ENOMEM);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list