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