summaryrefslogtreecommitdiff
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-01-30 13:03:01 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-01-30 19:12:55 -0500
commitcb023d9afe9da0a9d221b5eeddd2981c520b5978 (patch)
treea4650d2cf01f90aefabf6e9b2d741b7ab1f617fb /libavcodec/adpcmenc.c
parentddf70db6d71fdab15bf8626aea4301b85891c2bd (diff)
adpcmenc: check for coded_frame allocation failure
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r--libavcodec/adpcmenc.c3
1 files changed, 2 insertions, 1 deletions
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: