Browse Source

avcodec/flacenc: Use av_malloc_array()

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

+ 1
- 1
libavcodec/flacenc.c View File

@@ -649,7 +649,7 @@ static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax,

tmp_rc.coding_mode = rc->coding_mode;

udata = av_malloc(n * sizeof(uint32_t));
udata = av_malloc_array(n, sizeof(uint32_t));
for (i = 0; i < n; i++)
udata[i] = (2*data[i]) ^ (data[i]>>31);



Loading…
Cancel
Save