static int source_request_frame(AVFilterLink *outlink)

{

    Frei0rContext *frei0r = outlink->src->priv;

    AVFilterBufferRef *picref = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);

    int ret;



    picref->video->pixel_aspect = (AVRational) {1, 1};

    picref->pts = frei0r->pts++;

    picref->pos = -1;



    ret = ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0));

    if (ret < 0)

        goto fail;



    frei0r->update(frei0r->instance, av_rescale_q(picref->pts, frei0r->time_base, (AVRational){1,1000}),

                   NULL, (uint32_t *)picref->data[0]);

    ret = ff_draw_slice(outlink, 0, outlink->h, 1);

    if (ret < 0)

        goto fail;



    ret = ff_end_frame(outlink);



fail:

    avfilter_unref_buffer(picref);



    return ret;

}

static int source_request_frame(AVFilterLink *outlink)

{

    Frei0rContext *frei0r = outlink->src->priv;

    AVFilterBufferRef *picref = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);

    int ret;



    picref->video->pixel_aspect = (AVRational) {1, 1};

    picref->pts = frei0r->pts++;

    picref->pos = -1;



    ret = ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0));

    if (ret < 0)

        goto fail;



    frei0r->update(frei0r->instance, av_rescale_q(picref->pts, frei0r->time_base, (AVRational){1,1000}),

                   NULL, (uint32_t *)picref->data[0]);

    ret = ff_draw_slice(outlink, 0, outlink->h, 1);

    if (ret < 0)

        goto fail;



    ret = ff_end_frame(outlink);



fail:

    avfilter_unref_buffer(picref);



    return ret;

}

static int FUNC_0(AVFilterLink *VAR_0)

{

    Frei0rContext *frei0r = VAR_0->src->priv;

    AVFilterBufferRef *picref = ff_get_video_buffer(VAR_0, AV_PERM_WRITE, VAR_0->w, VAR_0->h);

    int VAR_1;



    picref->video->pixel_aspect = (AVRational) {1, 1};

    picref->pts = frei0r->pts++;

    picref->pos = -1;



    VAR_1 = ff_start_frame(VAR_0, avfilter_ref_buffer(picref, ~0));

    if (VAR_1 < 0)

        goto fail;



    frei0r->update(frei0r->instance, av_rescale_q(picref->pts, frei0r->time_base, (AVRational){1,1000}),

                   NULL, (uint32_t *)picref->data[0]);

    VAR_1 = ff_draw_slice(VAR_0, 0, VAR_0->h, 1);

    if (VAR_1 < 0)

        goto fail;



    VAR_1 = ff_end_frame(VAR_0);



fail:

    avfilter_unref_buffer(picref);



    return VAR_1;

}

static int FUNC_0(AVFilterLink *VAR_0)
{ Frei0rContext *frei0r = VAR_0->src->priv; AVFilterBufferRef *picref = ff_get_video_buffer(VAR_0, AV_PERM_WRITE, VAR_0->w, VAR_0->h); int VAR_1; picref->video->pixel_aspect = (AVRational) {1, 1}; picref->pts = frei0r->pts++; picref->pos = -1; VAR_1 = ff_start_frame(VAR_0, avfilter_ref_buffer(picref, ~0)); if (VAR_1 < 0)
goto fail; frei0r->update(frei0r->instance, av_rescale_q(picref->pts, frei0r->time_base, (AVRational){1,1000}), NULL, (uint32_t *)picref->data[0]); VAR_1 = ff_draw_slice(VAR_0, 0, VAR_0->h, 1); if (VAR_1 < 0)
goto fail; VAR_1 = ff_end_frame(VAR_0); fail:
avfilter_unref_buffer(picref); return VAR_1; }