[FFmpeg-cvslog] avcodec/tscc: check av_frame_alloc() for failure

Paul B Mahol git at videolan.org
Sat Sep 8 22:42:21 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | 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;
 }



More information about the ffmpeg-cvslog mailing list