v210dec: check for coded_frame allocation failure
authorPaul B Mahol <onemda@gmail.com>
Sun, 5 Feb 2012 21:14:39 +0000 (21:14 +0000)
committerAnton Khirnov <anton@khirnov.net>
Mon, 6 Feb 2012 07:00:31 +0000 (08:00 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/v210dec.c

index 37b4a3c..d464572 100644 (file)
@@ -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;
 }