]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libopusenc.c
Merge commit '9b8c8a9395c849639aea0f6b5300e991e93c3a73'
[ffmpeg] / libavcodec / libopusenc.c
index 6bb48628ab91b9822ba10cd2c19b212414440717..785460972d0eac1ec2f6555dadd01ee436098bfa 100644 (file)
@@ -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");