static int channelmap_config_input(AVFilterLink *inlink)

{

    AVFilterContext *ctx = inlink->dst;

    ChannelMapContext *s = ctx->priv;

    int i, err = 0;

    const char *channel_name;

    char layout_name[256];



    if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) {

        for (i = 0; i < s->nch; i++) {

            s->map[i].in_channel_idx = av_get_channel_layout_channel_index(

                inlink->channel_layout, s->map[i].in_channel);

            if (s->map[i].in_channel_idx < 0) {

                channel_name = av_get_channel_name(s->map[i].in_channel);

                av_get_channel_layout_string(layout_name, sizeof(layout_name),

                                             0, inlink->channel_layout);

                av_log(ctx, AV_LOG_ERROR,

                       "input channel '%s' not available from input layout '%s'\n",

                       channel_name, layout_name);

                err = AVERROR(EINVAL);

            }

        }

    }



    return err;

}

static int channelmap_config_input(AVFilterLink *inlink)

{

    AVFilterContext *ctx = inlink->dst;

    ChannelMapContext *s = ctx->priv;

    int i, err = 0;

    const char *channel_name;

    char layout_name[256];



    if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) {

        for (i = 0; i < s->nch; i++) {

            s->map[i].in_channel_idx = av_get_channel_layout_channel_index(

                inlink->channel_layout, s->map[i].in_channel);

            if (s->map[i].in_channel_idx < 0) {

                channel_name = av_get_channel_name(s->map[i].in_channel);

                av_get_channel_layout_string(layout_name, sizeof(layout_name),

                                             0, inlink->channel_layout);

                av_log(ctx, AV_LOG_ERROR,

                       "input channel '%s' not available from input layout '%s'\n",

                       channel_name, layout_name);

                err = AVERROR(EINVAL);

            }

        }

    }



    return err;

}

    if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) {         for (i = 0; i < s->nch; i++) {             if (s->map[i].in_channel_idx < 0) {                 av_get_channel_layout_string(layout_name, sizeof(layout_name),                                              0, inlink->channel_layout);                 err = AVERROR(EINVAL);
static int FUNC_0(AVFilterLink *VAR_0)

{

    AVFilterContext *ctx = VAR_0->dst;

    ChannelMapContext *s = ctx->priv;

    int VAR_1, VAR_2 = 0;

    const char *VAR_3;

    char VAR_4[256];



    if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) {

        for (VAR_1 = 0; VAR_1 < s->nch; VAR_1++) {

            s->map[VAR_1].in_channel_idx = av_get_channel_layout_channel_index(

                VAR_0->channel_layout, s->map[VAR_1].in_channel);

            if (s->map[VAR_1].in_channel_idx < 0) {

                VAR_3 = av_get_channel_name(s->map[VAR_1].in_channel);

                av_get_channel_layout_string(VAR_4, sizeof(VAR_4),

                                             0, VAR_0->channel_layout);

                av_log(ctx, AV_LOG_ERROR,

                       "input channel '%s' not available from input layout '%s'\n",

                       VAR_3, VAR_4);

                VAR_2 = AVERROR(EINVAL);

            }

        }

    }



    return VAR_2;

}

static int FUNC_0(AVFilterLink *VAR_0)
{ AVFilterContext *ctx = VAR_0->dst; ChannelMapContext *s = ctx->priv; int VAR_1, VAR_2 = 0; const char *VAR_3; char VAR_4[256]; if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) { for (VAR_1 = 0; VAR_1 < s->nch; VAR_1++) { s->map[VAR_1].in_channel_idx = av_get_channel_layout_channel_index(
VAR_0->channel_layout, s->map[VAR_1].in_channel); if (s->map[VAR_1].in_channel_idx < 0) { VAR_3 = av_get_channel_name(s->map[VAR_1].in_channel); av_get_channel_layout_string(VAR_4, sizeof(VAR_4),
0, VAR_0->channel_layout); av_log(ctx, AV_LOG_ERROR,
"input channel '%s' not available from input layout '%s'\n",
VAR_3, VAR_4); VAR_2 = AVERROR(EINVAL); } } } return VAR_2; }