avcodec/flacenc: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/68/head
Michael Niedermayer 11 years ago
parent f08ca91b05
commit 0eb9482e32
  1. 2
      libavcodec/flacenc.c

@ -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