Commit 1f4ef3cc authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libopusenc: Use av_mallocz_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7532f0e1
......@@ -277,7 +277,7 @@ static av_cold int libopus_encode_init(AVCodecContext *avctx)
}
avctx->extradata_size = header_size;
opus->samples = av_mallocz(frame_size * avctx->channels *
opus->samples = av_mallocz_array(frame_size, avctx->channels *
av_get_bytes_per_sample(avctx->sample_fmt));
if (!opus->samples) {
av_log(avctx, AV_LOG_ERROR, "Failed to allocate samples buffer.\n");
......
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