* commit '3f14febbdf7c93bbd186399da27991180e5916b6': af_channelsplit: switch to an AVOptions-based system. Conflicts: libavfilter/af_channelsplit.c
Unified · Split
| @@ -55,10 +55,6 @@ static int init(AVFilterContext *ctx, const char *arg) · 54 unmodified lines | ||
| 55 | 55 | int nb_channels; |
| 56 | 56 | int ret = 0, i; |
| 57 | 57 | |
| 58 | − s->class = &channelsplit_class; | |
| 59 | − av_opt_set_defaults(s); | |
| 60 | − if ((ret = av_set_options_string(s, arg, "=", ":")) < 0) | |
| 61 | − return ret; | |
| 62 | 58 | if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) { |
| 63 | 59 | av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n", |
| 64 | 60 | s->channel_layout_str); |
| @@ -78,7 +74,6 @@ static int init(AVFilterContext *ctx, const char *arg) · 13 unmodified lines | ||
| 78 | 74 | } |
| 79 | 75 | |
| 80 | 76 | fail: |
| 81 | − av_opt_free(s); | |
| 82 | 77 | return ret; |
| 83 | 78 | } |
| 84 | 79 | |
| @@ -144,11 +139,11 @@ AVFilter avfilter_af_channelsplit = { · 59 unmodified lines | ||
| 144 | 139 | .name = "channelsplit", |
| 145 | 140 | .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"), |
| 146 | 141 | .priv_size = sizeof(ChannelSplitContext), |
| 142 | + .priv_class = &channelsplit_class, | |
| 147 | 143 | |
| 148 | 144 | .init = init, |
| 149 | 145 | .query_formats = query_formats, |
| 150 | 146 | |
| 151 | 147 | .inputs = avfilter_af_channelsplit_inputs, |
| 152 | 148 | .outputs = NULL, |
| 153 | − .priv_class = &channelsplit_class, | |
| 154 | 149 | }; |
| @@ -668,6 +668,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 667 unmodified lines | ||
| 668 | 668 | !strcmp(filter->filter->name, "boxblur" ) || |
| 669 | 669 | !strcmp(filter->filter->name, "cellauto") || |
| 670 | 670 | !strcmp(filter->filter->name, "channelmap") || |
| 671 | + !strcmp(filter->filter->name, "channelsplit") || | |
| 671 | 672 | !strcmp(filter->filter->name, "colormatrix") || |
| 672 | 673 | !strcmp(filter->filter->name, "crop" ) || |
| 673 | 674 | !strcmp(filter->filter->name, "cropdetect") || |