]> git.sesse.net Git - ffmpeg/commitdiff
v210dec: check return value of avcodec_alloc_frame()
authorPaul B Mahol <onemda@gmail.com>
Sat, 28 Jan 2012 20:25:59 +0000 (20:25 +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/v210dec.c

index 1af7f943e13107a69999bd32113823f749e0d615..1703ceebddbf7b8d4b314666023261e18ad0e204 100644 (file)
@@ -58,6 +58,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);
 
     s->unpack_frame            = v210_planar_unpack_c;