#define SWR_CH_MAX 64
-typedef struct {
+typedef struct AMergeContext {
const AVClass *class;
int nb_inputs;
int route[SWR_CH_MAX]; /**< channels routing, see copy_samples */
static av_cold int init(AVFilterContext *ctx)
{
AMergeContext *s = ctx->priv;
- int i;
+ int i, ret;
s->in = av_calloc(s->nb_inputs, sizeof(*s->in));
if (!s->in)
};
if (!name)
return AVERROR(ENOMEM);
- ff_insert_inpad(ctx, i, &pad);
+ if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) {
+ av_freep(&pad.name);
+ return ret;
+ }
}
return 0;
}