diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-21 16:00:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-21 16:03:22 +0200 |
commit | e61055fd8ba3fee2d4f575b655eb65d7edd039bc (patch) | |
tree | 6c093b8be50facd905072fa52a34444350c0b8cc | |
parent | 606a49d2e6f1eaef28515ce8801571724be783b5 (diff) | |
download | ffmpeg-e61055fd8ba3fee2d4f575b655eb65d7edd039bc.tar.gz |
avcodec/atrac3plusdec: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/atrac3plusdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/atrac3plusdec.c b/libavcodec/atrac3plusdec.c index 652bd7890d..3a6b3cfa2e 100644 --- a/libavcodec/atrac3plusdec.c +++ b/libavcodec/atrac3plusdec.c @@ -166,8 +166,8 @@ static av_cold int atrac3p_decode_init(AVCodecContext *avctx) ctx->my_channel_layout = avctx->channel_layout; - ctx->ch_units = av_mallocz(sizeof(*ctx->ch_units) * - ctx->num_channel_blocks); + ctx->ch_units = av_mallocz_array(ctx->num_channel_blocks, sizeof(*ctx->ch_units)); + if (!ctx->ch_units) { atrac3p_decode_close(avctx); return AVERROR(ENOMEM); |