mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/af_aphaser: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3a10bf93b5
commit
1c7ac94cdf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user