]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_aphaser: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jun 2014 13:05:33 +0000 (15:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jun 2014 13:05:33 +0000 (15:05 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/af_aphaser.c

index 0fc45eab43c7be4717bbf68a79adafe074bae025..119e1a385e21fb171bb85209b3f515b12853de54 100644 (file)
@@ -269,7 +269,7 @@ static int config_output(AVFilterLink *outlink)
     p->delay_buffer_length = p->delay * 0.001 * inlink->sample_rate + 0.5;
     p->delay_buffer = av_calloc(p->delay_buffer_length, sizeof(*p->delay_buffer) * inlink->channels);
     p->modulation_buffer_length = inlink->sample_rate / p->speed + 0.5;
-    p->modulation_buffer = av_malloc(p->modulation_buffer_length * sizeof(*p->modulation_buffer));
+    p->modulation_buffer = av_malloc_array(p->modulation_buffer_length, sizeof(*p->modulation_buffer));
 
     if (!p->modulation_buffer || !p->delay_buffer)
         return AVERROR(ENOMEM);