ffmpeg | branch: master | Paul B Mahol <[email protected]> | Sat Sep  8 21:17:26 
2018 +0200| [86e7e7816b24b9ae1605735a790c2cef251c8210] | committer: Paul B Mahol

avcodec/tscc: check av_frame_alloc() for failure

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86e7e7816b24b9ae1605735a790c2cef251c8210
---

 libavcodec/tscc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index 31e7caeeeb..35f7ad05dd 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -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;
 }

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to