summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-28 19:04:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-01-28 20:13:38 +0100
commit88fb935c1cb95c6e0e41b0b3ede2f87c60782a7c (patch)
treebc69881043273456eb94ae099de4c5ecf07eacb4 /libavcodec/ac3enc.c
parentcb73e35660b9191227d26c996b531ce995057774 (diff)
ac3enc: check return value of avcodec_alloc_frame()
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 93a08821be..2f1e7c8f67 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2466,6 +2466,8 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
goto init_fail;
avctx->coded_frame= avcodec_alloc_frame();
+ if (!avctx->coded_frame)
+ goto init_fail;
dsputil_init(&s->dsp, avctx);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);