Browse Source

avcodec/atrac3plusdec: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
e61055fd8b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/atrac3plusdec.c

+ 2
- 2
libavcodec/atrac3plusdec.c View File

@@ -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);


Loading…
Cancel
Save