avcodec/cook: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-22 20:00:14 +02:00
parent b20d6cf603
commit ea8e089ff7
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ static av_cold int init_cook_mlt(COOKContext *q)
int j, ret; int j, ret;
int mlt_size = q->samples_per_channel; int mlt_size = q->samples_per_channel;
if ((q->mlt_window = av_malloc(mlt_size * sizeof(*q->mlt_window))) == 0) if ((q->mlt_window = av_malloc_array(mlt_size, sizeof(*q->mlt_window))) == 0)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
/* Initialize the MLT window: simple sine window. */ /* Initialize the MLT window: simple sine window. */