[FFmpeg-cvslog] avcodec/ttaenc: use av_malloc_array()
Michael Niedermayer
git at videolan.org
Fri Apr 25 15:12:52 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 25 15:04:42 2014 +0200| [681a5b8d6f35ce72fdcd57e62e4b8c763c720779] | committer: Michael Niedermayer
avcodec/ttaenc: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=681a5b8d6f35ce72fdcd57e62e4b8c763c720779
---
libavcodec/ttaenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ttaenc.c b/libavcodec/ttaenc.c
index e95dd6b..75d1664 100644
--- a/libavcodec/ttaenc.c
+++ b/libavcodec/ttaenc.c
@@ -53,7 +53,7 @@ static av_cold int tta_encode_init(AVCodecContext *avctx)
s->bps = avctx->bits_per_raw_sample >> 3;
avctx->frame_size = 256 * avctx->sample_rate / 245;
- s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));
+ s->ch_ctx = av_malloc_array(avctx->channels, sizeof(*s->ch_ctx));
if (!s->ch_ctx)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list