avcodec/tscc: check av_frame_alloc() for failure
authorPaul B Mahol <onemda@gmail.com>
Sat, 8 Sep 2018 19:17:26 +0000 (21:17 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sat, 8 Sep 2018 19:17:26 +0000 (21:17 +0200)
libavcodec/tscc.c

index 31e7cae..35f7ad0 100644 (file)
@@ -169,6 +169,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     }
 
     c->frame = av_frame_alloc();
+    if (!c->frame)
+        return AVERROR(ENOMEM);
 
     return 0;
 }