Browse Source

avcodec/cinepakenc: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
e2c7816ab0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/cinepakenc.c

+ 2
- 2
libavcodec/cinepakenc.c View File

@@ -236,11 +236,11 @@ static av_cold int cinepak_encode_init(AVCodecContext *avctx)
if (!(s->frame_buf = av_malloc(frame_buf_size)))
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;

#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;
#endif



Loading…
Cancel
Save