swresample/dither: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a5290cb1ac)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0143eb9109
commit
2880de35b5
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@
|
|||
void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt) {
|
||||
double scale = 0;
|
||||
#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;
|
||||
|
||||
out_fmt = av_get_packed_sample_fmt(out_fmt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue