v210x: check for return value of avcodec_alloc_frame()
authorPaul B Mahol <onemda@gmail.com>
Sat, 28 Jan 2012 20:27:35 +0000 (20:27 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 28 Jan 2012 21:08:21 +0000 (22:08 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/v210x.c

index ec74a33..1435249 100644 (file)
@@ -31,6 +31,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;
 }