aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-22 02:38:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-22 02:38:03 +0200
commit78fb5f6e2aaa1fb9989209512be8cb7848264b77 (patch)
tree3e313f6f2a1430208e8e12452b28229ca2126433
parent0dadbbbfd1652c6d287054c3c0bb5466e801b00d (diff)
downloadffmpeg-78fb5f6e2aaa1fb9989209512be8cb7848264b77.tar.gz
avcodec/cngenc: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/cngenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c
index 5ab6e365c1..bf5f7bf54b 100644
--- a/libavcodec/cngenc.c
+++ b/libavcodec/cngenc.c
@@ -56,8 +56,8 @@ static av_cold int cng_encode_init(AVCodecContext *avctx)
p->order = 10;
if ((ret = ff_lpc_init(&p->lpc, avctx->frame_size, p->order, FF_LPC_TYPE_LEVINSON)) < 0)
return ret;
- p->samples32 = av_malloc(avctx->frame_size * sizeof(*p->samples32));
- p->ref_coef = av_malloc(p->order * sizeof(*p->ref_coef));
+ p->samples32 = av_malloc_array(avctx->frame_size, sizeof(*p->samples32));
+ p->ref_coef = av_malloc_array(p->order, sizeof(*p->ref_coef));
if (!p->samples32 || !p->ref_coef) {
cng_encode_close(avctx);
return AVERROR(ENOMEM);