diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-29 23:23:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-29 23:23:22 +0200 |
commit | 24b4e6c373f8f942b2417d3cfed508c065b9d69e (patch) | |
tree | 07025e847d588dc5c07ba0b4d1158483edad0924 /libavcodec/snowenc.c | |
parent | c4224fff1b0ac3fb67daf5e36184afa609ce8f90 (diff) | |
download | ffmpeg-24b4e6c373f8f942b2417d3cfed508c065b9d69e.tar.gz |
snow: Check av_frame_alloc() failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index befa4d1373..250057521d 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -129,6 +129,8 @@ static av_cold int encode_init(AVCodecContext *avctx) ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp); s->input_picture = av_frame_alloc(); + if (!s->input_picture) + return AVERROR(ENOMEM); if ((ret = ff_get_buffer(s->avctx, s->input_picture, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; |