[FFmpeg-cvslog] ffv1: check for malloc failure.
Michael Niedermayer
git at videolan.org
Sat May 11 21:31:54 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 11 21:23:46 2013 +0200| [b8a2331a70b720e83e1be243f7d17941c8952ef2] | committer: Michael Niedermayer
ffv1: check for malloc failure.
Somehow i managed to loose this fix before pushing
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8a2331a70b720e83e1be243f7d17941c8952ef2
---
libavcodec/ffv1.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 1b038b1..3299cc6 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -51,6 +51,8 @@ av_cold int ffv1_common_init(AVCodecContext *avctx)
s->picture.f = avcodec_alloc_frame();
s->last_picture.f = av_frame_alloc();
+ if (!s->picture.f || !s->last_picture.f)
+ return AVERROR(ENOMEM);
ff_dsputil_init(&s->dsp, avctx);
s->width = avctx->width;
More information about the ffmpeg-cvslog
mailing list