aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-28 19:06:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-01-28 20:14:20 +0100
commit7b21b0f155fffa1af52e48f187415e3d58bdbae1 (patch)
tree4de197eb4ca1d494fd490eae69fdf0a6b038f2e1 /libavcodec
parent88fb935c1cb95c6e0e41b0b3ede2f87c60782a7c (diff)
downloadffmpeg-7b21b0f155fffa1af52e48f187415e3d58bdbae1.tar.gz
adxenc: 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')
-rw-r--r--libavcodec/adxenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index b029e2eb78..c6e46565f6 100644
--- a/libavcodec/adxenc.c
+++ b/libavcodec/adxenc.c
@@ -120,6 +120,8 @@ static av_cold int adx_encode_init(AVCodecContext *avctx)
avctx->frame_size = BLOCK_SAMPLES;
avctx->coded_frame = avcodec_alloc_frame();
+ if (!avctx->coded_frame)
+ return AVERROR(ENOMEM);
/* the cutoff can be adjusted, but this seems to work pretty well */
c->cutoff = 500;