Commit 681a5b8d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ttaenc: use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent abbcc6b2
......@@ -53,7 +53,7 @@ static av_cold int tta_encode_init(AVCodecContext *avctx)
s->bps = avctx->bits_per_raw_sample >> 3;
avctx->frame_size = 256 * avctx->sample_rate / 245;
s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));
s->ch_ctx = av_malloc_array(avctx->channels, sizeof(*s->ch_ctx));
if (!s->ch_ctx)
return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment