1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-26 14:14:54 +02:00

avcodec/ratecontrol: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-20 17:30:15 +02:00
parent 69bbe27b45
commit 1fd5c7f1ee

View File

@ -952,8 +952,8 @@ static int init_pass2(MpegEncContext *s)
return -1;
}
qscale = av_malloc(sizeof(double) * rcc->num_entries);
blurred_qscale = av_malloc(sizeof(double) * rcc->num_entries);
qscale = av_malloc_array(rcc->num_entries, sizeof(double));
blurred_qscale = av_malloc_array(rcc->num_entries, sizeof(double));
toobig = 0;
for (step = 256 * 256; step > 0.0000001; step *= 0.5) {