diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-15 19:26:09 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-25 11:49:41 -0500 |
commit | a8bdf2405c6027f45a899eaaa6ba74e97c1c2701 (patch) | |
tree | 0538bf58d2aca6d32b0dc45f5b2806b330b9898a /libavcodec/libvo-amrwbenc.c | |
parent | 255ad8881db0fa937e3632c4937f23d29d0e423d (diff) | |
download | ffmpeg-a8bdf2405c6027f45a899eaaa6ba74e97c1c2701.tar.gz |
check for coded_frame allocation failure in several audio encoders
Diffstat (limited to 'libavcodec/libvo-amrwbenc.c')
-rw-r--r-- | libavcodec/libvo-amrwbenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c index 5214ee6d2e..7e8721015b 100644 --- a/libavcodec/libvo-amrwbenc.c +++ b/libavcodec/libvo-amrwbenc.c @@ -87,6 +87,8 @@ static av_cold int amr_wb_encode_init(AVCodecContext *avctx) avctx->frame_size = 320; avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); s->state = E_IF_init(); |