avcodec/flacenc: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-30 18:28:40 +02:00
parent f08ca91b05
commit 0eb9482e32

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);