Commit f17651bd authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '3f14febb'

* commit '3f14febb':
  af_channelsplit: switch to an AVOptions-based system.

Conflicts:
	libavfilter/af_channelsplit.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents d9d7c549 3f14febb
...@@ -55,10 +55,6 @@ static int init(AVFilterContext *ctx, const char *arg) ...@@ -55,10 +55,6 @@ static int init(AVFilterContext *ctx, const char *arg)
int nb_channels; int nb_channels;
int ret = 0, i; int ret = 0, i;
s->class = &channelsplit_class;
av_opt_set_defaults(s);
if ((ret = av_set_options_string(s, arg, "=", ":")) < 0)
return ret;
if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) { if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n", av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",
s->channel_layout_str); s->channel_layout_str);
...@@ -78,7 +74,6 @@ static int init(AVFilterContext *ctx, const char *arg) ...@@ -78,7 +74,6 @@ static int init(AVFilterContext *ctx, const char *arg)
} }
fail: fail:
av_opt_free(s);
return ret; return ret;
} }
...@@ -144,11 +139,11 @@ AVFilter avfilter_af_channelsplit = { ...@@ -144,11 +139,11 @@ AVFilter avfilter_af_channelsplit = {
.name = "channelsplit", .name = "channelsplit",
.description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"), .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
.priv_size = sizeof(ChannelSplitContext), .priv_size = sizeof(ChannelSplitContext),
.priv_class = &channelsplit_class,
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = avfilter_af_channelsplit_inputs, .inputs = avfilter_af_channelsplit_inputs,
.outputs = NULL, .outputs = NULL,
.priv_class = &channelsplit_class,
}; };
...@@ -668,6 +668,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque ...@@ -668,6 +668,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "boxblur" ) || !strcmp(filter->filter->name, "boxblur" ) ||
!strcmp(filter->filter->name, "cellauto") || !strcmp(filter->filter->name, "cellauto") ||
!strcmp(filter->filter->name, "channelmap") || !strcmp(filter->filter->name, "channelmap") ||
!strcmp(filter->filter->name, "channelsplit") ||
!strcmp(filter->filter->name, "colormatrix") || !strcmp(filter->filter->name, "colormatrix") ||
!strcmp(filter->filter->name, "crop" ) || !strcmp(filter->filter->name, "crop" ) ||
!strcmp(filter->filter->name, "cropdetect") || !strcmp(filter->filter->name, "cropdetect") ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment