summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-13 23:28:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-13 23:36:59 +0200
commit5ec81929497ccb6abc614c3c4ece2546361ee586 (patch)
treef9f62cf484f0a1547aee9be8aa8067990403878b
parenteccec203978e53f897a3c6105d011bbdff2a978b (diff)
avcodec/fft-test: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/fft-test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index ef1d62240c..a29896fde7 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -75,7 +75,7 @@ static void fft_ref_init(int nbits, int inverse)
double c1, s1, alpha;
n = 1 << nbits;
- exptab = av_malloc((n / 2) * sizeof(*exptab));
+ exptab = av_malloc_array((n / 2), sizeof(*exptab));
for (i = 0; i < (n/2); i++) {
alpha = 2 * M_PI * (float)i / (float)n;
@@ -304,10 +304,10 @@ int main(int argc, char **argv)
}
fft_size = 1 << fft_nbits;
- tab = av_malloc(fft_size * sizeof(FFTComplex));
- tab1 = av_malloc(fft_size * sizeof(FFTComplex));
- tab_ref = av_malloc(fft_size * sizeof(FFTComplex));
- tab2 = av_malloc(fft_size * sizeof(FFTSample));
+ tab = av_malloc_array(fft_size, sizeof(FFTComplex));
+ tab1 = av_malloc_array(fft_size, sizeof(FFTComplex));
+ tab_ref = av_malloc_array(fft_size, sizeof(FFTComplex));
+ tab2 = av_malloc_array(fft_size, sizeof(FFTSample));
switch (transform) {
case TRANSFORM_MDCT: