1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/atrac3plusdec: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-21 16:00:14 +02:00
parent 606a49d2e6
commit e61055fd8b

View File

@ -166,8 +166,8 @@ static av_cold int atrac3p_decode_init(AVCodecContext *avctx)
ctx->my_channel_layout = avctx->channel_layout; ctx->my_channel_layout = avctx->channel_layout;
ctx->ch_units = av_mallocz(sizeof(*ctx->ch_units) * ctx->ch_units = av_mallocz_array(ctx->num_channel_blocks, sizeof(*ctx->ch_units));
ctx->num_channel_blocks);
if (!ctx->ch_units) { if (!ctx->ch_units) {
atrac3p_decode_close(avctx); atrac3p_decode_close(avctx);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);