From 7532f0e14c5e34835f72e5bd82a022076b2ef269 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 17 Jan 2015 12:56:19 +0100 Subject: [PATCH] avcodec/libmp3lame: use av_malloc_array() Signed-off-by: Michael Niedermayer --- libavcodec/libmp3lame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index e33919be89..6b9561d71a 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -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);