summaryrefslogtreecommitdiff
path: root/libavfilter/af_channelsplit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/af_channelsplit.c')
-rw-r--r--libavfilter/af_channelsplit.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index 68615aa609..76dd835b30 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -41,17 +41,12 @@ typedef struct ChannelSplitContext {
#define OFFSET(x) offsetof(ChannelSplitContext, x)
#define A AV_OPT_FLAG_AUDIO_PARAM
-static const AVOption options[] = {
+static const AVOption channelsplit_options[] = {
{ "channel_layout", "Input channel layout.", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, { .str = "stereo" }, .flags = A },
{ NULL },
};
-static const AVClass channelsplit_class = {
- .class_name = "channelsplit filter",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
+AVFILTER_DEFINE_CLASS(channelsplit);
static int init(AVFilterContext *ctx, const char *arg)
{
@@ -61,10 +56,8 @@ static int init(AVFilterContext *ctx, const char *arg)
s->class = &channelsplit_class;
av_opt_set_defaults(s);
- if ((ret = av_set_options_string(s, arg, "=", ":")) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Error parsing options string '%s'.\n", arg);
+ if ((ret = av_set_options_string(s, arg, "=", ":")) < 0)
return ret;
- }
if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",
s->channel_layout_str);