mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-16 04:11:12 +00:00
avcodec/flacenc: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f08ca91b05
commit
0eb9482e32
@ -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…
Reference in New Issue
Block a user