On 5/17/2018 2:19 PM, Paul B Mahol wrote:
> +static int config_input(AVFilterLink *inlink)
> +{
> +    AVFilterContext *ctx = inlink->dst;
> +    DeclickContext *s = ctx->priv;
> +    int i;
> +
> +    s->pts = AV_NOPTS_VALUE;
> +    s->window_size = inlink->sample_rate * s->w / 1000.;
> +    if (s->window_size < 100)
> +        return AVERROR(EINVAL);
> +    s->ar_order = FFMAX(s->window_size * s->ar / 100., 1);
> +    s->nb_burst_samples = s->window_size * s->burst / 1000.;
> +    s->hop_size = s->window_size * (1. - (s->overlap / 100.));
> +    if (s->hop_size < 1)
> +        return AVERROR(EINVAL);
> +
> +    s->fifo = av_audio_fifo_alloc(inlink->format, inlink->channels, 
> s->window_size);
> +    if (!s->fifo)
> +        return AVERROR(ENOMEM);
> +
> +    s->window_func_lut = av_realloc_f(s->window_func_lut, s->window_size,
> +                                      sizeof(*s->window_func_lut));

av_malloc_array()
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to