static av_cold int join_init(AVFilterContext *ctx)

{

    JoinContext *s = ctx->priv;

    int ret, i;



    if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {

        av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",

               s->channel_layout_str);

        return AVERROR(EINVAL);

    }



    s->nb_channels  = av_get_channel_layout_nb_channels(s->channel_layout);

    s->channels     = av_mallocz_array(s->nb_channels, sizeof(*s->channels));

    s->buffers      = av_mallocz_array(s->nb_channels, sizeof(*s->buffers));

    s->input_frames = av_mallocz_array(s->inputs, sizeof(*s->input_frames));

    if (!s->channels || !s->buffers|| !s->input_frames)

        return AVERROR(ENOMEM);



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

        s->channels[i].out_channel = av_channel_layout_extract_channel(s->channel_layout, i);

        s->channels[i].input       = -1;

    }



    if ((ret = parse_maps(ctx)) < 0)

        return ret;



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

        char name[32];

        AVFilterPad pad = { 0 };



        snprintf(name, sizeof(name), "input%d", i);

        pad.type           = AVMEDIA_TYPE_AUDIO;

        pad.name           = av_strdup(name);

        if (!pad.name)

            return AVERROR(ENOMEM);

        pad.filter_frame   = filter_frame;



        pad.needs_fifo = 1;



        ff_insert_inpad(ctx, i, &pad);

    }



    return 0;

}

static av_cold int join_init(AVFilterContext *ctx)

{

    JoinContext *s = ctx->priv;

    int ret, i;



    if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {

        av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",

               s->channel_layout_str);

        return AVERROR(EINVAL);

    }



    s->nb_channels  = av_get_channel_layout_nb_channels(s->channel_layout);

    s->channels     = av_mallocz_array(s->nb_channels, sizeof(*s->channels));

    s->buffers      = av_mallocz_array(s->nb_channels, sizeof(*s->buffers));

    s->input_frames = av_mallocz_array(s->inputs, sizeof(*s->input_frames));

    if (!s->channels || !s->buffers|| !s->input_frames)

        return AVERROR(ENOMEM);



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

        s->channels[i].out_channel = av_channel_layout_extract_channel(s->channel_layout, i);

        s->channels[i].input       = -1;

    }



    if ((ret = parse_maps(ctx)) < 0)

        return ret;



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

        char name[32];

        AVFilterPad pad = { 0 };



        snprintf(name, sizeof(name), "input%d", i);

        pad.type           = AVMEDIA_TYPE_AUDIO;

        pad.name           = av_strdup(name);

        if (!pad.name)

            return AVERROR(ENOMEM);

        pad.filter_frame   = filter_frame;



        pad.needs_fifo = 1;



        ff_insert_inpad(ctx, i, &pad);

    }



    return 0;

}

        ff_insert_inpad(ctx, i, &pad);
static av_cold int FUNC_0(AVFilterContext *ctx)

{

    JoinContext *s = ctx->priv;

    int VAR_0, VAR_1;



    if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {

        av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",

               s->channel_layout_str);

        return AVERROR(EINVAL);

    }



    s->nb_channels  = av_get_channel_layout_nb_channels(s->channel_layout);

    s->channels     = av_mallocz_array(s->nb_channels, sizeof(*s->channels));

    s->buffers      = av_mallocz_array(s->nb_channels, sizeof(*s->buffers));

    s->input_frames = av_mallocz_array(s->inputs, sizeof(*s->input_frames));

    if (!s->channels || !s->buffers|| !s->input_frames)

        return AVERROR(ENOMEM);



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

        s->channels[VAR_1].out_channel = av_channel_layout_extract_channel(s->channel_layout, VAR_1);

        s->channels[VAR_1].input       = -1;

    }



    if ((VAR_0 = parse_maps(ctx)) < 0)

        return VAR_0;



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

        char name[32];

        AVFilterPad pad = { 0 };



        snprintf(name, sizeof(name), "input%d", VAR_1);

        pad.type           = AVMEDIA_TYPE_AUDIO;

        pad.name           = av_strdup(name);

        if (!pad.name)

            return AVERROR(ENOMEM);

        pad.filter_frame   = filter_frame;



        pad.needs_fifo = 1;



        ff_insert_inpad(ctx, VAR_1, &pad);

    }



    return 0;

}

static av_cold int FUNC_0(AVFilterContext *ctx)
{ JoinContext *s = ctx->priv; int VAR_0, VAR_1; if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) { av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",
s->channel_layout_str); return AVERROR(EINVAL); } s->nb_channels  = av_get_channel_layout_nb_channels(s->channel_layout); s->channels     = av_mallocz_array(s->nb_channels, sizeof(*s->channels)); s->buffers      = av_mallocz_array(s->nb_channels, sizeof(*s->buffers)); s->input_frames = av_mallocz_array(s->inputs, sizeof(*s->input_frames)); if (!s->channels || !s->buffers|| !s->input_frames)
return AVERROR(ENOMEM); for (VAR_1 = 0; VAR_1 < s->nb_channels; VAR_1++) { s->channels[VAR_1].out_channel = av_channel_layout_extract_channel(s->channel_layout, VAR_1); s->channels[VAR_1].input       = -1; } if ((VAR_0 = parse_maps(ctx)) < 0)
return VAR_0; for (VAR_1 = 0; VAR_1 < s->inputs; VAR_1++) { char name[32]; AVFilterPad pad = { 0 }; snprintf(name, sizeof(name), "input%d", VAR_1); pad.type           = AVMEDIA_TYPE_AUDIO; pad.name           = av_strdup(name); if (!pad.name)
return AVERROR(ENOMEM); pad.filter_frame   = filter_frame; pad.needs_fifo = 1; ff_insert_inpad(ctx, VAR_1, &pad); } return 0; }