static int filter_frame(AVFilterLink *link, AVFrame *frame)

{

    AVFilterContext *ctx = link->dst;

    AudioFIRContext *s = ctx->priv;

    AVFilterLink *outlink = ctx->outputs[0];

    int ret = 0;



    av_audio_fifo_write(s->fifo[0], (void **)frame->extended_data,

                        frame->nb_samples);

    if (s->pts == AV_NOPTS_VALUE)

        s->pts = frame->pts;



    av_frame_free(&frame);



    if (!s->have_coeffs && s->eof_coeffs) {

        ret = convert_coeffs(ctx);

        if (ret < 0)

            return ret;

    }



    if (s->have_coeffs) {

        while (av_audio_fifo_size(s->fifo[0]) >= s->part_size) {

            ret = fir_frame(s, outlink);

            if (ret < 0)

                break;

        }

    }

    return ret;

}

static int filter_frame(AVFilterLink *link, AVFrame *frame)

{

    AVFilterContext *ctx = link->dst;

    AudioFIRContext *s = ctx->priv;

    AVFilterLink *outlink = ctx->outputs[0];

    int ret = 0;



    av_audio_fifo_write(s->fifo[0], (void **)frame->extended_data,

                        frame->nb_samples);

    if (s->pts == AV_NOPTS_VALUE)

        s->pts = frame->pts;



    av_frame_free(&frame);



    if (!s->have_coeffs && s->eof_coeffs) {

        ret = convert_coeffs(ctx);

        if (ret < 0)

            return ret;

    }



    if (s->have_coeffs) {

        while (av_audio_fifo_size(s->fifo[0]) >= s->part_size) {

            ret = fir_frame(s, outlink);

            if (ret < 0)

                break;

        }

    }

    return ret;

}

static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)

{

    AVFilterContext *ctx = VAR_0->dst;

    AudioFIRContext *s = ctx->priv;

    AVFilterLink *outlink = ctx->outputs[0];

    int VAR_2 = 0;



    av_audio_fifo_write(s->fifo[0], (void **)VAR_1->extended_data,

                        VAR_1->nb_samples);

    if (s->pts == AV_NOPTS_VALUE)

        s->pts = VAR_1->pts;



    av_frame_free(&VAR_1);



    if (!s->have_coeffs && s->eof_coeffs) {

        VAR_2 = convert_coeffs(ctx);

        if (VAR_2 < 0)

            return VAR_2;

    }



    if (s->have_coeffs) {

        while (av_audio_fifo_size(s->fifo[0]) >= s->part_size) {

            VAR_2 = fir_frame(s, outlink);

            if (VAR_2 < 0)

                break;

        }

    }

    return VAR_2;

}

static int FUNC_0(AVFilterLink *VAR_0, AVFrame *VAR_1)
{ AVFilterContext *ctx = VAR_0->dst; AudioFIRContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; int VAR_2 = 0; av_audio_fifo_write(s->fifo[0], (void **)VAR_1->extended_data,
VAR_1->nb_samples); if (s->pts == AV_NOPTS_VALUE)
s->pts = VAR_1->pts; av_frame_free(&VAR_1); if (!s->have_coeffs && s->eof_coeffs) { VAR_2 = convert_coeffs(ctx); if (VAR_2 < 0)
return VAR_2; } if (s->have_coeffs) { while (av_audio_fifo_size(s->fifo[0]) >= s->part_size) { VAR_2 = fir_frame(s, outlink); if (VAR_2 < 0)
break; } } return VAR_2; }