[FFmpeg-cvslog] yop: check return value of av_frame_alloc()

Paul B Mahol git at videolan.org
Fri Jul 26 15:53:08 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul 26 13:51:26 2013 +0000| [3838637bbb140f793958cc797d33196296533db6] | committer: Paul B Mahol

yop: check return value of av_frame_alloc()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 807e170..6315add 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list