yop: check return value of av_frame_alloc()
authorPaul B Mahol <onemda@gmail.com>
Fri, 26 Jul 2013 13:51:26 +0000 (13:51 +0000)
committerPaul B Mahol <onemda@gmail.com>
Fri, 26 Jul 2013 13:51:26 +0000 (13:51 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/yop.c

index 807e170..6315add 100644 (file)
@@ -118,6 +118,8 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
     }
 
     s->frame = av_frame_alloc();
+    if (!s->frame)
+        return AVERROR(ENOMEM);
 
     return 0;
 }