From a8bdf2405c6027f45a899eaaa6ba74e97c1c2701 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 15 Feb 2012 19:26:09 -0500 Subject: check for coded_frame allocation failure in several audio encoders --- libavcodec/libvo-aacenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/libvo-aacenc.c') diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c index 280ba27ef9..0a4a270eda 100644 --- a/libavcodec/libvo-aacenc.c +++ b/libavcodec/libvo-aacenc.c @@ -39,6 +39,8 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) int index; avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); avctx->frame_size = 1024; voGetAACEncAPI(&s->codec_api); -- cgit v1.2.3