aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-03 19:22:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-03 20:08:18 +0200
commit77df9de78c9a54202973a4b6df48370bbddf142b (patch)
tree5a2a0e66547d5fce55f8c21d6fe216a3c57b8951 /libavcodec
parentcc861581735b08817c7fbacd38ffab73fb9fe38a (diff)
downloadffmpeg-77df9de78c9a54202973a4b6df48370bbddf142b.tar.gz
avcdoec/snowenc: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/snowenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 996ab6b95a..6291bb67fd 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -72,7 +72,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->m.bit_rate= avctx->bit_rate;
s->m.me.temp =
- s->m.me.scratchpad= av_mallocz((avctx->width+64)*2*16*2*sizeof(uint8_t));
+ s->m.me.scratchpad= av_mallocz_array((avctx->width+64), 2*16*2*sizeof(uint8_t));
s->m.me.map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t));
s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t));
s->m.obmc_scratchpad= av_mallocz(MB_SIZE*MB_SIZE*12*sizeof(uint32_t));
@@ -131,8 +131,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
int i;
int size= s->b_width * s->b_height << 2*s->block_max_depth;
for(i=0; i<s->max_ref_frames; i++){
- s->ref_mvs[i]= av_mallocz(size*sizeof(int16_t[2]));
- s->ref_scores[i]= av_mallocz(size*sizeof(uint32_t));
+ s->ref_mvs[i]= av_mallocz_array(size, sizeof(int16_t[2]));
+ s->ref_scores[i]= av_mallocz_array(size, sizeof(uint32_t));
if (!s->ref_mvs[i] || !s->ref_scores[i])
return AVERROR(ENOMEM);
}