]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_channelsplit.c
lavfi: remove palette libmpcodecs wrapper
[ffmpeg] / libavfilter / af_channelsplit.c
index 76dd835b307783ed86893bfeba5186041d4d02fb..56950c8fd42b482e1b2055c655f6151f00e77dea 100644 (file)
@@ -41,8 +41,9 @@ typedef struct ChannelSplitContext {
 
 #define OFFSET(x) offsetof(ChannelSplitContext, x)
 #define A AV_OPT_FLAG_AUDIO_PARAM
+#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 },
+    { "channel_layout", "Input channel layout.", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, { .str = "stereo" }, .flags = A|F },
     { NULL },
 };
 
@@ -129,6 +130,15 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
     return ret;
 }
 
+static const AVFilterPad avfilter_af_channelsplit_inputs[] = {
+    {
+        .name           = "default",
+        .type           = AVMEDIA_TYPE_AUDIO,
+        .filter_samples = filter_samples,
+    },
+    { NULL }
+};
+
 AVFilter avfilter_af_channelsplit = {
     .name           = "channelsplit",
     .description    = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
@@ -137,9 +147,7 @@ AVFilter avfilter_af_channelsplit = {
     .init           = init,
     .query_formats  = query_formats,
 
-    .inputs  = (const AVFilterPad[]){{ .name           = "default",
-                                       .type           = AVMEDIA_TYPE_AUDIO,
-                                       .filter_samples = filter_samples, },
-                                     { NULL }},
-    .outputs = (const AVFilterPad[]){{ NULL }},
+    .inputs  = avfilter_af_channelsplit_inputs,
+    .outputs = NULL,
+    .priv_class = &channelsplit_class,
 };