From cb023d9afe9da0a9d221b5eeddd2981c520b5978 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 30 Jan 2012 13:03:01 -0500 Subject: adpcmenc: check for coded_frame allocation failure --- libavcodec/adpcmenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec/adpcmenc.c') diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 9cf1e39149..26d673d4b5 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -135,7 +135,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) goto error; } - avctx->coded_frame = avcodec_alloc_frame(); + if (!(avctx->coded_frame = avcodec_alloc_frame())) + goto error; return 0; error: -- cgit v1.2.3