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/roqaudioenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/roqaudioenc.c') diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c index e2d0f3896e..3747f18c1b 100644 --- a/libavcodec/roqaudioenc.c +++ b/libavcodec/roqaudioenc.c @@ -59,6 +59,8 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx) context->lastSample[0] = context->lastSample[1] = 0; avctx->coded_frame= avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); return 0; } -- cgit v1.2.3