int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame,

                             AVFilterBufferRef **picref_ptr, AVRational *tb)

{

    int ret;

    AVFilterBufferRef *picref;




    if ((ret = avfilter_request_frame(ctx->inputs[0])) < 0)

        return ret;

    if (!(picref = ctx->inputs[0]->cur_buf))

        return AVERROR(ENOENT);

    *picref_ptr = picref;

    ctx->inputs[0]->cur_buf = NULL;

    *tb = ctx->inputs[0]->time_base;



    memcpy(frame->data,     picref->data,     sizeof(frame->data));

    memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));

    frame->pkt_pos          = picref->pos;

    frame->interlaced_frame = picref->video->interlaced;

    frame->top_field_first  = picref->video->top_field_first;

    frame->key_frame        = picref->video->key_frame;

    frame->pict_type        = picref->video->pict_type;

    frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;



    return 1;

}
int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame,

                             AVFilterBufferRef **picref_ptr, AVRational *tb)

{

    int ret;

    AVFilterBufferRef *picref;




    if ((ret = avfilter_request_frame(ctx->inputs[0])) < 0)

        return ret;

    if (!(picref = ctx->inputs[0]->cur_buf))

        return AVERROR(ENOENT);

    *picref_ptr = picref;

    ctx->inputs[0]->cur_buf = NULL;

    *tb = ctx->inputs[0]->time_base;



    memcpy(frame->data,     picref->data,     sizeof(frame->data));

    memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));

    frame->pkt_pos          = picref->pos;

    frame->interlaced_frame = picref->video->interlaced;

    frame->top_field_first  = picref->video->top_field_first;

    frame->key_frame        = picref->video->key_frame;

    frame->pict_type        = picref->video->pict_type;

    frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;



    return 1;

}
int FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1,

                             AVFilterBufferRef **VAR_2, AVRational *VAR_3)

{

    int VAR_4;

    AVFilterBufferRef *picref;




    if ((VAR_4 = avfilter_request_frame(VAR_0->inputs[0])) < 0)

        return VAR_4;

    if (!(picref = VAR_0->inputs[0]->cur_buf))

        return AVERROR(ENOENT);

    *VAR_2 = picref;

    VAR_0->inputs[0]->cur_buf = NULL;

    *VAR_3 = VAR_0->inputs[0]->time_base;



    memcpy(VAR_1->data,     picref->data,     sizeof(VAR_1->data));

    memcpy(VAR_1->linesize, picref->linesize, sizeof(VAR_1->linesize));

    VAR_1->pkt_pos          = picref->pos;

    VAR_1->interlaced_frame = picref->video->interlaced;

    VAR_1->top_field_first  = picref->video->top_field_first;

    VAR_1->key_frame        = picref->video->key_frame;

    VAR_1->pict_type        = picref->video->pict_type;

    VAR_1->sample_aspect_ratio = picref->video->sample_aspect_ratio;



    return 1;

}
int FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1,
AVFilterBufferRef **VAR_2, AVRational *VAR_3)
{ int VAR_4; AVFilterBufferRef *picref; if ((VAR_4 = avfilter_request_frame(VAR_0->inputs[0])) < 0)
return VAR_4; if (!(picref = VAR_0->inputs[0]->cur_buf))
return AVERROR(ENOENT); *VAR_2 = picref; VAR_0->inputs[0]->cur_buf = NULL; *VAR_3 = VAR_0->inputs[0]->time_base; memcpy(VAR_1->data,     picref->data,     sizeof(VAR_1->data)); memcpy(VAR_1->linesize, picref->linesize, sizeof(VAR_1->linesize)); VAR_1->pkt_pos          = picref->pos; VAR_1->interlaced_frame = picref->video->interlaced; VAR_1->top_field_first  = picref->video->top_field_first; VAR_1->key_frame        = picref->video->key_frame; VAR_1->pict_type        = picref->video->pict_type; VAR_1->sample_aspect_ratio = picref->video->sample_aspect_ratio; return 1; }