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

avcodec/ttaenc: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-25 15:04:42 +02:00
parent abbcc6b26b
commit 681a5b8d6f

View File

@ -53,7 +53,7 @@ static av_cold int tta_encode_init(AVCodecContext *avctx)
s->bps = avctx->bits_per_raw_sample >> 3; s->bps = avctx->bits_per_raw_sample >> 3;
avctx->frame_size = 256 * avctx->sample_rate / 245; 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) if (!s->ch_ctx)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);