diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-17 12:58:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-17 12:58:56 +0100 |
commit | 1f4ef3ccaee64d38ccbcb040c024193d2b3bebf2 (patch) | |
tree | d525c18d9d897e9d1e89db0634bddce6ca9edb60 | |
parent | 7532f0e14c5e34835f72e5bd82a022076b2ef269 (diff) | |
download | ffmpeg-1f4ef3ccaee64d38ccbcb040c024193d2b3bebf2.tar.gz |
avcodec/libopusenc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libopusenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index 6bb48628ab..785460972d 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"); |