Unified · Split
| @@ -59,12 +59,6 @@ static int init(AVFilterContext *ctx, const char *arg) · 58 unmodified lines | ||
| 59 | 59 | int nb_channels; |
| 60 | 60 | int ret = 0, i; |
| 61 | 61 | |
| 62 | − s->class = &channelsplit_class; | |
| 63 | − av_opt_set_defaults(s); | |
| 64 | − if ((ret = av_set_options_string(s, arg, "=", ":")) < 0) { | |
| 65 | − av_log(ctx, AV_LOG_ERROR, "Error parsing options string '%s'.\n", arg); | |
| 66 | − return ret; | |
| 67 | − } | |
| 68 | 62 | if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) { |
| 69 | 63 | av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n", |
| 70 | 64 | s->channel_layout_str); |
| @@ -84,7 +78,6 @@ static int init(AVFilterContext *ctx, const char *arg) · 13 unmodified lines | ||
| 84 | 78 | } |
| 85 | 79 | |
| 86 | 80 | fail: |
| 87 | − av_opt_free(s); | |
| 88 | 81 | return ret; |
| 89 | 82 | } |
| 90 | 83 | |
| @@ -149,6 +142,7 @@ AVFilter avfilter_af_channelsplit = { · 58 unmodified lines | ||
| 149 | 142 | .name = "channelsplit", |
| 150 | 143 | .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"), |
| 151 | 144 | .priv_size = sizeof(ChannelSplitContext), |
| 145 | + .priv_class = &channelsplit_class, | |
| 152 | 146 | |
| 153 | 147 | .init = init, |
| 154 | 148 | .query_formats = query_formats, |