Skip to content
Snippets Groups Projects
Commit 1fd5c7f1 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/ratecontrol: use av_malloc_array()

parent 69bbe27b
Branches
Tags
No related merge requests found
...@@ -952,8 +952,8 @@ static int init_pass2(MpegEncContext *s) ...@@ -952,8 +952,8 @@ static int init_pass2(MpegEncContext *s)
return -1; return -1;
} }
qscale = av_malloc(sizeof(double) * rcc->num_entries); qscale = av_malloc_array(rcc->num_entries, sizeof(double));
blurred_qscale = av_malloc(sizeof(double) * rcc->num_entries); blurred_qscale = av_malloc_array(rcc->num_entries, sizeof(double));
toobig = 0; toobig = 0;
for (step = 256 * 256; step > 0.0000001; step *= 0.5) { for (step = 256 * 256; step > 0.0000001; step *= 0.5) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment