diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-01-28 20:01:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-28 22:08:20 +0100 |
commit | 766e160e87c3c1997559b8225a635b68a06167fc (patch) | |
tree | ed00c0ed527ae522cc1c3465a14030e1fbeb2cd7 /libavcodec | |
parent | a136c2cf3e5dc9e79db8dfb63ee9f53cf67a0d20 (diff) | |
download | ffmpeg-766e160e87c3c1997559b8225a635b68a06167fc.tar.gz |
libopencore-amr: check return value of avcodec_alloc_frame()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libopencore-amr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c index 0de7130f19..d4853ca200 100644 --- a/libavcodec/libopencore-amr.c +++ b/libavcodec/libopencore-amr.c @@ -196,6 +196,8 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx) avctx->frame_size = 160; avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); s->enc_state = Encoder_Interface_init(s->enc_dtx); if (!s->enc_state) { |