diff options
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index d2c0beb1aa..55ebfba50f 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -79,7 +79,7 @@ static av_cold int encode_init(AVCodecContext *avctx) s->m.mb_num = (avctx->width * avctx->height + 255) / 256; // For ratecontrol s->m.me.temp = - s->m.me.scratchpad= av_mallocz_array((avctx->width+64), 2*16*2*sizeof(uint8_t)); + s->m.me.scratchpad = av_calloc(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.sc.obmc_scratchpad= av_mallocz(MB_SIZE*MB_SIZE*12*sizeof(uint32_t)); @@ -145,8 +145,8 @@ static av_cold int encode_init(AVCodecContext *avctx) if(s->motion_est == FF_ME_ITER){ 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_array(size, sizeof(int16_t[2])); - s->ref_scores[i]= av_mallocz_array(size, sizeof(uint32_t)); + s->ref_mvs[i] = av_calloc(size, sizeof(*s->ref_mvs[i])); + s->ref_scores[i] = av_calloc(size, sizeof(*s->ref_scores[i])); if (!s->ref_mvs[i] || !s->ref_scores[i]) return AVERROR(ENOMEM); } |