mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/libopusenc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7532f0e14c
commit
1f4ef3ccae
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user