Browse Source

avcodec/ratecontrol: use av_malloc_array()

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

+ 2
- 2
libavcodec/ratecontrol.c 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) {


Loading…
Cancel
Save