* Split an audio stream into per-channel streams.
*/
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
.version = LIBAVUTIL_VERSION_INT,
};
-static int init(AVFilterContext *ctx, const char *arg)
+static av_cold int init(AVFilterContext *ctx)
{
ChannelSplitContext *s = ctx->priv;
int nb_channels;
int ret = 0, i;
- s->class = &channelsplit_class;
- av_opt_set_defaults(s);
- if ((ret = av_set_options_string(s, arg, "=", ":")) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Error parsing options string '%s'.\n", arg);
- return ret;
- }
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);
}
fail:
- av_opt_free(s);
return ret;
}
{ NULL }
};
-AVFilter avfilter_af_channelsplit = {
+AVFilter ff_af_channelsplit = {
.name = "channelsplit",
.description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
.priv_size = sizeof(ChannelSplitContext),
+ .priv_class = &channelsplit_class,
.init = init,
.query_formats = query_formats,
.inputs = avfilter_af_channelsplit_inputs,
.outputs = NULL,
+
+ .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
};