]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/split.c
lavfi/setdar: fix num/den swapping in log message
[ffmpeg] / libavfilter / split.c
index cde2ab1efbc356e00fc3200bc766a87b0c2b3a34..251ea2e4a3e2fc6abdc3c949945403440b45611d 100644 (file)
@@ -39,7 +39,7 @@ typedef struct SplitContext {
     int nb_outputs;
 } SplitContext;
 
-static int split_init(AVFilterContext *ctx, const char *args)
+static int split_init(AVFilterContext *ctx)
 {
     SplitContext *s = ctx->priv;
     int i;
@@ -93,23 +93,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 #define OFFSET(x) offsetof(SplitContext, x)
 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
 static const AVOption options[] = {
-    { "outputs", "Number of outputs", OFFSET(nb_outputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, FLAGS },
+    { "outputs", "set number of outputs", OFFSET(nb_outputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, FLAGS },
     { NULL },
 };
 
-static const AVClass split_class = {
-    .class_name = "split",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-};
+#define split_options options
+AVFILTER_DEFINE_CLASS(split);
 
-static const AVClass asplit_class = {
-    .class_name = "asplit",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-};
+#define asplit_options options
+AVFILTER_DEFINE_CLASS(asplit);
 
 static const AVFilterPad avfilter_vf_split_inputs[] = {
     {
@@ -133,6 +125,8 @@ AVFilter avfilter_vf_split = {
 
     .inputs    = avfilter_vf_split_inputs,
     .outputs   = NULL,
+
+    .flags     = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
 };
 
 static const AVFilterPad avfilter_af_asplit_inputs[] = {
@@ -157,4 +151,6 @@ AVFilter avfilter_af_asplit = {
 
     .inputs  = avfilter_af_asplit_inputs,
     .outputs = NULL,
+
+    .flags   = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
 };