]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v210x.c
v210x: check for return value of avcodec_alloc_frame()
[ffmpeg] / libavcodec / v210x.c
index ec74a3384fe00c8e42bfd2ab75b1ca752f0fdac5..1435249e04cb6461e94c12f9dba20a04d14c45f8 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;
 }