static int push_samples(AVFilterLink *outlink)

{

    ASNSContext *asns = outlink->src->priv;

    AVFrame *outsamples = NULL;

    int ret, nb_out_samples, nb_pad_samples;



    if (asns->pad) {

        nb_out_samples = av_audio_fifo_size(asns->fifo) ? asns->nb_out_samples : 0;

        nb_pad_samples = nb_out_samples - FFMIN(nb_out_samples, av_audio_fifo_size(asns->fifo));

    } else {

        nb_out_samples = FFMIN(asns->nb_out_samples, av_audio_fifo_size(asns->fifo));

        nb_pad_samples = 0;

    }



    if (!nb_out_samples)

        return 0;



    outsamples = ff_get_audio_buffer(outlink, nb_out_samples);

    av_assert0(outsamples);



    av_audio_fifo_read(asns->fifo,

                       (void **)outsamples->extended_data, nb_out_samples);



    if (nb_pad_samples)

        av_samples_set_silence(outsamples->extended_data, nb_out_samples - nb_pad_samples,

                               nb_pad_samples, av_get_channel_layout_nb_channels(outlink->channel_layout),

                               outlink->format);

    outsamples->nb_samples     = nb_out_samples;

    outsamples->channel_layout = outlink->channel_layout;

    outsamples->sample_rate    = outlink->sample_rate;

    outsamples->pts = asns->next_out_pts;



    if (asns->next_out_pts != AV_NOPTS_VALUE)

        asns->next_out_pts += nb_out_samples;



    ret = ff_filter_frame(outlink, outsamples);

    if (ret < 0)

        return ret;

    asns->req_fullfilled = 1;

    return nb_out_samples;

}

static int push_samples(AVFilterLink *outlink)

{

    ASNSContext *asns = outlink->src->priv;

    AVFrame *outsamples = NULL;

    int ret, nb_out_samples, nb_pad_samples;



    if (asns->pad) {

        nb_out_samples = av_audio_fifo_size(asns->fifo) ? asns->nb_out_samples : 0;

        nb_pad_samples = nb_out_samples - FFMIN(nb_out_samples, av_audio_fifo_size(asns->fifo));

    } else {

        nb_out_samples = FFMIN(asns->nb_out_samples, av_audio_fifo_size(asns->fifo));

        nb_pad_samples = 0;

    }



    if (!nb_out_samples)

        return 0;



    outsamples = ff_get_audio_buffer(outlink, nb_out_samples);

    av_assert0(outsamples);



    av_audio_fifo_read(asns->fifo,

                       (void **)outsamples->extended_data, nb_out_samples);



    if (nb_pad_samples)

        av_samples_set_silence(outsamples->extended_data, nb_out_samples - nb_pad_samples,

                               nb_pad_samples, av_get_channel_layout_nb_channels(outlink->channel_layout),

                               outlink->format);

    outsamples->nb_samples     = nb_out_samples;

    outsamples->channel_layout = outlink->channel_layout;

    outsamples->sample_rate    = outlink->sample_rate;

    outsamples->pts = asns->next_out_pts;



    if (asns->next_out_pts != AV_NOPTS_VALUE)

        asns->next_out_pts += nb_out_samples;



    ret = ff_filter_frame(outlink, outsamples);

    if (ret < 0)

        return ret;

    asns->req_fullfilled = 1;

    return nb_out_samples;

}

static int FUNC_0(AVFilterLink *VAR_0)

{

    ASNSContext *asns = VAR_0->src->priv;

    AVFrame *outsamples = NULL;

    int VAR_1, VAR_2, VAR_3;



    if (asns->pad) {

        VAR_2 = av_audio_fifo_size(asns->fifo) ? asns->VAR_2 : 0;

        VAR_3 = VAR_2 - FFMIN(VAR_2, av_audio_fifo_size(asns->fifo));

    } else {

        VAR_2 = FFMIN(asns->VAR_2, av_audio_fifo_size(asns->fifo));

        VAR_3 = 0;

    }



    if (!VAR_2)

        return 0;



    outsamples = ff_get_audio_buffer(VAR_0, VAR_2);

    av_assert0(outsamples);



    av_audio_fifo_read(asns->fifo,

                       (void **)outsamples->extended_data, VAR_2);



    if (VAR_3)

        av_samples_set_silence(outsamples->extended_data, VAR_2 - VAR_3,

                               VAR_3, av_get_channel_layout_nb_channels(VAR_0->channel_layout),

                               VAR_0->format);

    outsamples->nb_samples     = VAR_2;

    outsamples->channel_layout = VAR_0->channel_layout;

    outsamples->sample_rate    = VAR_0->sample_rate;

    outsamples->pts = asns->next_out_pts;



    if (asns->next_out_pts != AV_NOPTS_VALUE)

        asns->next_out_pts += VAR_2;



    VAR_1 = ff_filter_frame(VAR_0, outsamples);

    if (VAR_1 < 0)

        return VAR_1;

    asns->req_fullfilled = 1;

    return VAR_2;

}

static int FUNC_0(AVFilterLink *VAR_0)
{ ASNSContext *asns = VAR_0->src->priv; AVFrame *outsamples = NULL; int VAR_1, VAR_2, VAR_3; if (asns->pad) { VAR_2 = av_audio_fifo_size(asns->fifo) ? asns->VAR_2 : 0; VAR_3 = VAR_2 - FFMIN(VAR_2, av_audio_fifo_size(asns->fifo)); } else { VAR_2 = FFMIN(asns->VAR_2, av_audio_fifo_size(asns->fifo)); VAR_3 = 0; } if (!VAR_2)
return 0; outsamples = ff_get_audio_buffer(VAR_0, VAR_2); av_assert0(outsamples); av_audio_fifo_read(asns->fifo,
(void **)outsamples->extended_data, VAR_2); if (VAR_3)
av_samples_set_silence(outsamples->extended_data, VAR_2 - VAR_3,
VAR_3, av_get_channel_layout_nb_channels(VAR_0->channel_layout),
VAR_0->format); outsamples->nb_samples     = VAR_2; outsamples->channel_layout = VAR_0->channel_layout; outsamples->sample_rate    = VAR_0->sample_rate; outsamples->pts = asns->next_out_pts; if (asns->next_out_pts != AV_NOPTS_VALUE)
asns->next_out_pts += VAR_2; VAR_1 = ff_filter_frame(VAR_0, outsamples); if (VAR_1 < 0)
return VAR_1; asns->req_fullfilled = 1; return VAR_2; }