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/snow.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/snow.c')
-rw-r--r-- | libavcodec/snow.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 4ea82b35e9..1125b25367 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -462,10 +462,14 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ for(j=0; j<MAX_REF_FRAMES; j++) ff_scale_mv_ref[i][j] = 256*(i+1)/(j+1); s->last_picture[i] = av_frame_alloc(); + if (!s->last_picture[i]) + goto fail; } s->mconly_picture = av_frame_alloc(); s->current_picture = av_frame_alloc(); + if (!s->mconly_picture || !s->current_picture) + goto fail; return 0; fail: |