Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/af_channelsplit.c')
-rw-r--r--libavfilter/af_channelsplit.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index fc044d0f87..81f91ad393 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -41,17 +41,13 @@ typedef struct ChannelSplitContext {
#define OFFSET(x) offsetof(ChannelSplitContext, x)
#define A AV_OPT_FLAG_AUDIO_PARAM
-static const AVOption options[] = {
- { "channel_layout", "Input channel layout.", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, { .str = "stereo" }, .flags = A },
+#define F AV_OPT_FLAG_FILTERING_PARAM
+static const AVOption channelsplit_options[] = {
+ { "channel_layout", "Input channel layout.", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, { .str = "stereo" }, .flags = A|F },
{ 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 +57,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);
@@ -149,4 +143,5 @@ AVFilter avfilter_af_channelsplit = {
.filter_samples = filter_samples, },
{ NULL }},
.outputs = NULL,
+ .priv_class = &channelsplit_class,
};