[FFmpeg-cvslog] avcodec/libmp3lame: use av_malloc_array()
Michael Niedermayer
git at videolan.org
Sat Jan 17 13:30:13 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 17 12:56:19 2015 +0100| [7532f0e14c5e34835f72e5bd82a022076b2ef269] | committer: Michael Niedermayer
avcodec/libmp3lame: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7532f0e14c5e34835f72e5bd82a022076b2ef269
---
libavcodec/libmp3lame.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index e33919b..6b9561d 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -146,7 +146,7 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
if (avctx->sample_fmt == AV_SAMPLE_FMT_FLTP) {
int ch;
for (ch = 0; ch < avctx->channels; ch++) {
- s->samples_flt[ch] = av_malloc(avctx->frame_size *
+ s->samples_flt[ch] = av_malloc_array(avctx->frame_size,
sizeof(*s->samples_flt[ch]));
if (!s->samples_flt[ch]) {
ret = AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list