Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-29 00:01:09 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-01-29 01:08:20 +0400
commit766e160e87c3c1997559b8225a635b68a06167fc (patch)
treeed00c0ed527ae522cc1c3465a14030e1fbeb2cd7 /libavcodec/libopencore-amr.c
parenta136c2cf3e5dc9e79db8dfb63ee9f53cf67a0d20 (diff)
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/libopencore-amr.c')
-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) {