static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index,

                         const char *filt_name, const char *args, AVClass *log_ctx)

{

    AVFilter *filt;

    char inst_name[30];

    char tmp_args[256];

    int ret;



    snprintf(inst_name, sizeof(inst_name), "Parsed filter %d %s", index, filt_name);



    filt = avfilter_get_by_name(filt_name);



    if (!filt) {

        av_log(log_ctx, AV_LOG_ERROR,

               "No such filter: '%s'\n", filt_name);

        return AVERROR(EINVAL);

    }



    ret = avfilter_open(filt_ctx, filt, inst_name);

    if (!*filt_ctx) {

        av_log(log_ctx, AV_LOG_ERROR,

               "Error creating filter '%s'\n", filt_name);

        return ret;

    }



    if ((ret = avfilter_graph_add_filter(ctx, *filt_ctx)) < 0) {

        avfilter_free(*filt_ctx);

        return ret;

    }



    if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {

        snprintf(tmp_args, sizeof(tmp_args), "%s:%s",

                 args, ctx->scale_sws_opts);

        args = tmp_args;

    }



    if ((ret = avfilter_init_filter(*filt_ctx, args, NULL)) < 0) {

        av_log(log_ctx, AV_LOG_ERROR,

               "Error initializing filter '%s' with args '%s'\n", filt_name, args);

        return ret;

    }



    return 0;

}

static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index,

                         const char *filt_name, const char *args, AVClass *log_ctx)

{

    AVFilter *filt;

    char inst_name[30];

    char tmp_args[256];

    int ret;



    snprintf(inst_name, sizeof(inst_name), "Parsed filter %d %s", index, filt_name);



    filt = avfilter_get_by_name(filt_name);



    if (!filt) {

        av_log(log_ctx, AV_LOG_ERROR,

               "No such filter: '%s'\n", filt_name);

        return AVERROR(EINVAL);

    }



    ret = avfilter_open(filt_ctx, filt, inst_name);

    if (!*filt_ctx) {

        av_log(log_ctx, AV_LOG_ERROR,

               "Error creating filter '%s'\n", filt_name);

        return ret;

    }



    if ((ret = avfilter_graph_add_filter(ctx, *filt_ctx)) < 0) {

        avfilter_free(*filt_ctx);

        return ret;

    }



    if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {

        snprintf(tmp_args, sizeof(tmp_args), "%s:%s",

                 args, ctx->scale_sws_opts);

        args = tmp_args;

    }



    if ((ret = avfilter_init_filter(*filt_ctx, args, NULL)) < 0) {

        av_log(log_ctx, AV_LOG_ERROR,

               "Error initializing filter '%s' with args '%s'\n", filt_name, args);

        return ret;

    }



    return 0;

}

    if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {
static int FUNC_0(AVFilterContext **VAR_0, AVFilterGraph *VAR_1, int VAR_2,

                         const char *VAR_3, const char *VAR_4, AVClass *VAR_5)

{

    AVFilter *filt;

    char VAR_6[30];

    char VAR_7[256];

    int VAR_8;



    snprintf(VAR_6, sizeof(VAR_6), "Parsed filter %d %s", VAR_2, VAR_3);



    filt = avfilter_get_by_name(VAR_3);



    if (!filt) {

        av_log(VAR_5, AV_LOG_ERROR,

               "No such filter: '%s'\n", VAR_3);

        return AVERROR(EINVAL);

    }



    VAR_8 = avfilter_open(VAR_0, filt, VAR_6);

    if (!*VAR_0) {

        av_log(VAR_5, AV_LOG_ERROR,

               "Error creating filter '%s'\n", VAR_3);

        return VAR_8;

    }



    if ((VAR_8 = avfilter_graph_add_filter(VAR_1, *VAR_0)) < 0) {

        avfilter_free(*VAR_0);

        return VAR_8;

    }



    if (!strcmp(VAR_3, "scale") && !strstr(VAR_4, "flags")) {

        snprintf(VAR_7, sizeof(VAR_7), "%s:%s",

                 VAR_4, VAR_1->scale_sws_opts);

        VAR_4 = VAR_7;

    }



    if ((VAR_8 = avfilter_init_filter(*VAR_0, VAR_4, NULL)) < 0) {

        av_log(VAR_5, AV_LOG_ERROR,

               "Error initializing filter '%s' with VAR_4 '%s'\n", VAR_3, VAR_4);

        return VAR_8;

    }



    return 0;

}

static int FUNC_0(AVFilterContext **VAR_0, AVFilterGraph *VAR_1, int VAR_2,
const char *VAR_3, const char *VAR_4, AVClass *VAR_5)
{ AVFilter *filt; char VAR_6[30]; char VAR_7[256]; int VAR_8; snprintf(VAR_6, sizeof(VAR_6), "Parsed filter %d %s", VAR_2, VAR_3); filt = avfilter_get_by_name(VAR_3); if (!filt) { av_log(VAR_5, AV_LOG_ERROR,
"No such filter: '%s'\n", VAR_3); return AVERROR(EINVAL); } VAR_8 = avfilter_open(VAR_0, filt, VAR_6); if (!*VAR_0) { av_log(VAR_5, AV_LOG_ERROR,
"Error creating filter '%s'\n", VAR_3); return VAR_8; } if ((VAR_8 = avfilter_graph_add_filter(VAR_1, *VAR_0)) < 0) { avfilter_free(*VAR_0); return VAR_8; } if (!strcmp(VAR_3, "scale") && !strstr(VAR_4, "flags")) { snprintf(VAR_7, sizeof(VAR_7), "%s:%s",
VAR_4, VAR_1->scale_sws_opts); VAR_4 = VAR_7; } if ((VAR_8 = avfilter_init_filter(*VAR_0, VAR_4, NULL)) < 0) { av_log(VAR_5, AV_LOG_ERROR,
"Error initializing filter '%s' with VAR_4 '%s'\n", VAR_3, VAR_4); return VAR_8; } return 0; }