]> git.sesse.net Git - ffmpeg/commitdiff
r210dec: check return value of avcodec_alloc_frame()
authorPaul B Mahol <onemda@gmail.com>
Sat, 28 Jan 2012 20:09:05 +0000 (20:09 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 28 Jan 2012 21:08:20 +0000 (22:08 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/r210dec.c

index d31033229fa19203d7d65df9f978bc7522e9bd2b..d8cad3535ca541af9d0d3140f1105e42da6224ff 100644 (file)
@@ -29,6 +29,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;
 }