[FFmpeg-cvslog] avcodec/vp9: Use av_malloc_array()
Michael Niedermayer
git at videolan.org
Tue Aug 26 00:04:09 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Aug 25 18:33:11 2014 +0200| [2a85826e5753aac8964254bd5688a03e49a7f551] | committer: Michael Niedermayer
avcodec/vp9: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a85826e5753aac8964254bd5688a03e49a7f551
---
libavcodec/vp9.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 8f22685..31725e6 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -368,7 +368,7 @@ static int update_block_buffers(AVCodecContext *ctx)
if (s->uses_2pass) {
int sbs = s->sb_cols * s->sb_rows;
- s->b_base = av_malloc(sizeof(VP9Block) * s->cols * s->rows);
+ s->b_base = av_malloc_array(s->cols * s->rows, sizeof(VP9Block));
s->block_base = av_mallocz((64 * 64 + 128) * sbs * 3);
if (!s->b_base || !s->block_base)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list