History

af_channelsplit: switch to an AVOptions-based system.

Anton Khirnov committed 13 years ago

Commit 3f14feb1 parent ba8efac1 file · +1 −7Browse files

Unified · Split

libavfilter/af_channelsplit.c+1−7
@@ -59,12 +59,6 @@ static int init(AVFilterContext *ctx, const char *arg) · 58 unmodified lines
5959 int nb_channels;
6060 int ret = 0, i;
6161
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− }
6862 if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {
6963 av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",
7064 s->channel_layout_str);
@@ -84,7 +78,6 @@ static int init(AVFilterContext *ctx, const char *arg) · 13 unmodified lines
8478 }
8579
8680 fail:
87− av_opt_free(s);
8881 return ret;
8982 }
9083
@@ -149,6 +142,7 @@ AVFilter avfilter_af_channelsplit = { · 58 unmodified lines
149142 .name = "channelsplit",
150143 .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
151144 .priv_size = sizeof(ChannelSplitContext),
145+ .priv_class = &channelsplit_class,
152146
153147 .init = init,
154148 .query_formats = query_formats,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t