diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-09 23:18:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-09 23:18:32 +0200 |
commit | f703dae7aa76ea9ac4c5f578a0d2def94d90191e (patch) | |
tree | f81336f5c355161b26d4797255fb88bfdd7a005f /libavcodec/cngdec.c | |
parent | 2773ab36cc6480ce77845df0b1d1e2f790c59cde (diff) | |
download | ffmpeg-f703dae7aa76ea9ac4c5f578a0d2def94d90191e.tar.gz |
avcodec/cngdec: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cngdec.c')
-rw-r--r-- | libavcodec/cngdec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c index 12241c3b91..855baaaa8d 100644 --- a/libavcodec/cngdec.c +++ b/libavcodec/cngdec.c @@ -59,12 +59,12 @@ static av_cold int cng_decode_init(AVCodecContext *avctx) p->order = 12; avctx->frame_size = 640; - p->refl_coef = av_mallocz(p->order * sizeof(*p->refl_coef)); - p->target_refl_coef = av_mallocz(p->order * sizeof(*p->target_refl_coef)); - p->lpc_coef = av_mallocz(p->order * sizeof(*p->lpc_coef)); - p->filter_out = av_mallocz((avctx->frame_size + p->order) * + p->refl_coef = av_mallocz_array(p->order, sizeof(*p->refl_coef)); + p->target_refl_coef = av_mallocz_array(p->order, sizeof(*p->target_refl_coef)); + p->lpc_coef = av_mallocz_array(p->order, sizeof(*p->lpc_coef)); + p->filter_out = av_mallocz_array(avctx->frame_size + p->order, sizeof(*p->filter_out)); - p->excitation = av_mallocz(avctx->frame_size * sizeof(*p->excitation)); + p->excitation = av_mallocz_array(avctx->frame_size, sizeof(*p->excitation)); if (!p->refl_coef || !p->target_refl_coef || !p->lpc_coef || !p->filter_out || !p->excitation) { cng_decode_close(avctx); |