static int graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)

{

    int ret;



    /* find supported formats from sub-filters, and merge along links */

    if ((ret = query_formats(graph, log_ctx)) < 0)

        return ret;



    /* Once everything is merged, it's possible that we'll still have

     * multiple valid media format choices. We try to minimize the amount

     * of format conversion inside filters */

    reduce_formats(graph);



    /* for audio filters, ensure the best format, sample rate and channel layout

     * is selected */

    swap_sample_fmts(graph);

    swap_samplerates(graph);

    swap_channel_layouts(graph);



    if ((ret = pick_formats(graph)) < 0)

        return ret;



    return 0;

}

static int graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)

{

    int ret;



    

    if ((ret = query_formats(graph, log_ctx)) < 0)

        return ret;



    





    reduce_formats(graph);



    



    swap_sample_fmts(graph);

    swap_samplerates(graph);

    swap_channel_layouts(graph);



    if ((ret = pick_formats(graph)) < 0)

        return ret;



    return 0;

}

static int FUNC_0(AVFilterGraph *VAR_0, AVClass *VAR_1)

{

    int VAR_2;



    

    if ((VAR_2 = query_formats(VAR_0, VAR_1)) < 0)

        return VAR_2;



    





    reduce_formats(VAR_0);



    



    swap_sample_fmts(VAR_0);

    swap_samplerates(VAR_0);

    swap_channel_layouts(VAR_0);



    if ((VAR_2 = pick_formats(VAR_0)) < 0)

        return VAR_2;



    return 0;

}

static int FUNC_0(AVFilterGraph *VAR_0, AVClass *VAR_1)
{ int VAR_2; if ((VAR_2 = query_formats(VAR_0, VAR_1)) < 0)
return VAR_2; reduce_formats(VAR_0); swap_sample_fmts(VAR_0); swap_samplerates(VAR_0); swap_channel_layouts(VAR_0); if ((VAR_2 = pick_formats(VAR_0)) < 0)
return VAR_2; return 0; }