Commit 7532f0e1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libmp3lame: use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c4d85fc2
......@@ -146,7 +146,7 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
if (avctx->sample_fmt == AV_SAMPLE_FMT_FLTP) {
int ch;
for (ch = 0; ch < avctx->channels; ch++) {
s->samples_flt[ch] = av_malloc(avctx->frame_size *
s->samples_flt[ch] = av_malloc_array(avctx->frame_size,
sizeof(*s->samples_flt[ch]));
if (!s->samples_flt[ch]) {
ret = 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