Commit e2c7816a authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/cinepakenc: use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent efcea0b9
...@@ -236,11 +236,11 @@ static av_cold int cinepak_encode_init(AVCodecContext *avctx) ...@@ -236,11 +236,11 @@ static av_cold int cinepak_encode_init(AVCodecContext *avctx)
if (!(s->frame_buf = av_malloc(frame_buf_size))) if (!(s->frame_buf = av_malloc(frame_buf_size)))
goto enomem; goto enomem;
if (!(s->mb = av_malloc(mb_count*sizeof(mb_info)))) if (!(s->mb = av_malloc_array(mb_count, sizeof(mb_info))))
goto enomem; goto enomem;
#ifdef CINEPAKENC_DEBUG #ifdef CINEPAKENC_DEBUG
if (!(s->best_mb = av_malloc(mb_count*sizeof(mb_info)))) if (!(s->best_mb = av_malloc_array(mb_count, sizeof(mb_info))))
goto enomem; goto enomem;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment