diff options
author | Michael Niedermayer | 2013-05-11 21:23:46 +0200 |
---|---|---|
committer | Michael Niedermayer | 2013-05-11 21:23:46 +0200 |
commit | b8a2331a70b720e83e1be243f7d17941c8952ef2 (patch) | |
tree | e3ba3ac2114a3f4011a585b39ed0b77f7aeac7cb /libavcodec/ffv1.c | |
parent | bd63f8f6574da2db3d4539038cb99927f3ada8c3 (diff) |
ffv1: check for malloc failure.
Somehow i managed to loose this fix before pushing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r-- | libavcodec/ffv1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 1b038b11c9..3299cc6140 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; |