ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Sat Jan 17 12:58:56 2015 +0100| [1f4ef3ccaee64d38ccbcb040c024193d2b3bebf2] | committer: Michael Niedermayer
avcodec/libopusenc: Use av_mallocz_array() Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f4ef3ccaee64d38ccbcb040c024193d2b3bebf2 --- libavcodec/libopusenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index 6bb4862..7854609 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -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"); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog