mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 15:23:11 +00:00
swresample/dither: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f9158b01d0
commit
a5290cb1ac
@ -26,7 +26,7 @@
|
||||
void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) {
|
||||
double scale = s->dither.noise_scale;
|
||||
#define TMP_EXTRA 2
|
||||
double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double));
|
||||
double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double));
|
||||
int i;
|
||||
|
||||
for(i=0; i<len + TMP_EXTRA; i++){
|
||||
|
Loading…
Reference in New Issue
Block a user