int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,

                                 const char *name, const char *args, void *opaque,

                                 AVFilterGraph *graph_ctx)

{

    int ret;



    *filt_ctx = avfilter_graph_alloc_filter(graph_ctx, filt, name);

    if (!*filt_ctx)

        return AVERROR(ENOMEM);



    ret = avfilter_init_filter(*filt_ctx, args, opaque);

    if (ret < 0)

        goto fail;



    return 0;



fail:

    if (*filt_ctx)

        avfilter_free(*filt_ctx);

    *filt_ctx = NULL;

    return ret;

}

int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,

                                 const char *name, const char *args, void *opaque,

                                 AVFilterGraph *graph_ctx)

{

    int ret;



    *filt_ctx = avfilter_graph_alloc_filter(graph_ctx, filt, name);

    if (!*filt_ctx)

        return AVERROR(ENOMEM);



    ret = avfilter_init_filter(*filt_ctx, args, opaque);

    if (ret < 0)

        goto fail;



    return 0;



fail:

    if (*filt_ctx)

        avfilter_free(*filt_ctx);

    *filt_ctx = NULL;

    return ret;

}

int FUNC_0(AVFilterContext **VAR_0, AVFilter *VAR_1,

                                 const char *VAR_2, const char *VAR_3, void *VAR_4,

                                 AVFilterGraph *VAR_5)

{

    int VAR_6;



    *VAR_0 = avfilter_graph_alloc_filter(VAR_5, VAR_1, VAR_2);

    if (!*VAR_0)

        return AVERROR(ENOMEM);



    VAR_6 = avfilter_init_filter(*VAR_0, VAR_3, VAR_4);

    if (VAR_6 < 0)

        goto fail;



    return 0;



fail:

    if (*VAR_0)

        avfilter_free(*VAR_0);

    *VAR_0 = NULL;

    return VAR_6;

}

int FUNC_0(AVFilterContext **VAR_0, AVFilter *VAR_1,
const char *VAR_2, const char *VAR_3, void *VAR_4,
AVFilterGraph *VAR_5)
{ int VAR_6; *VAR_0 = avfilter_graph_alloc_filter(VAR_5, VAR_1, VAR_2); if (!*VAR_0)
return AVERROR(ENOMEM); VAR_6 = avfilter_init_filter(*VAR_0, VAR_3, VAR_4); if (VAR_6 < 0)
goto fail; return 0; fail:
if (*VAR_0)
avfilter_free(*VAR_0); *VAR_0 = NULL; return VAR_6; }