aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-28 20:01:09 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-01-28 22:08:20 +0100
commit766e160e87c3c1997559b8225a635b68a06167fc (patch)
treeed00c0ed527ae522cc1c3465a14030e1fbeb2cd7
parenta136c2cf3e5dc9e79db8dfb63ee9f53cf67a0d20 (diff)
downloadffmpeg-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>
-rw-r--r--libavcodec/libopencore-amr.c2
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) {