avfilter/vf_drawtext: Avoid using non public AV_PIX_FMT_NB
[ffmpeg.git] / libavfilter / split.c
index 3e6a60f..6abd5ee 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <stdio.h>
 
+#include "libavutil/attributes.h"
 #include "libavutil/internal.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
@@ -39,7 +40,7 @@ typedef struct SplitContext {
     int nb_outputs;
 } SplitContext;
 
-static int split_init(AVFilterContext *ctx)
+static av_cold int split_init(AVFilterContext *ctx)
 {
     SplitContext *s = ctx->priv;
     int i;
@@ -58,7 +59,7 @@ static int split_init(AVFilterContext *ctx)
     return 0;
 }
 
-static void split_uninit(AVFilterContext *ctx)
+static av_cold void split_uninit(AVFilterContext *ctx)
 {
     int i;
 
@@ -94,7 +95,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
 static const AVOption options[] = {
     { "outputs", "set number of outputs", OFFSET(nb_outputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, FLAGS },
-    { NULL },
+    { NULL }
 };
 
 #define split_options options
@@ -105,52 +106,42 @@ AVFILTER_DEFINE_CLASS(asplit);
 
 static const AVFilterPad avfilter_vf_split_inputs[] = {
     {
-        .name             = "default",
-        .type             = AVMEDIA_TYPE_VIDEO,
-        .get_video_buffer = ff_null_get_video_buffer,
-        .filter_frame     = filter_frame,
+        .name         = "default",
+        .type         = AVMEDIA_TYPE_VIDEO,
+        .filter_frame = filter_frame,
     },
     { NULL }
 };
 
-AVFilter avfilter_vf_split = {
-    .name      = "split",
+AVFilter ff_vf_split = {
+    .name        = "split",
     .description = NULL_IF_CONFIG_SMALL("Pass on the input to N video outputs."),
-
-    .priv_size  = sizeof(SplitContext),
-    .priv_class = &split_class,
-
-    .init   = split_init,
-    .uninit = split_uninit,
-
-    .inputs    = avfilter_vf_split_inputs,
-    .outputs   = NULL,
-
-    .flags     = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
+    .priv_size   = sizeof(SplitContext),
+    .priv_class  = &split_class,
+    .init        = split_init,
+    .uninit      = split_uninit,
+    .inputs      = avfilter_vf_split_inputs,
+    .outputs     = NULL,
+    .flags       = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
 };
 
 static const AVFilterPad avfilter_af_asplit_inputs[] = {
     {
-        .name             = "default",
-        .type             = AVMEDIA_TYPE_AUDIO,
-        .get_audio_buffer = ff_null_get_audio_buffer,
-        .filter_frame     = filter_frame,
+        .name         = "default",
+        .type         = AVMEDIA_TYPE_AUDIO,
+        .filter_frame = filter_frame,
     },
     { NULL }
 };
 
-AVFilter avfilter_af_asplit = {
+AVFilter ff_af_asplit = {
     .name        = "asplit",
     .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."),
-
-    .priv_size  = sizeof(SplitContext),
-    .priv_class = &asplit_class,
-
-    .init   = split_init,
-    .uninit = split_uninit,
-
-    .inputs  = avfilter_af_asplit_inputs,
-    .outputs = NULL,
-
-    .flags   = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
+    .priv_size   = sizeof(SplitContext),
+    .priv_class  = &asplit_class,
+    .init        = split_init,
+    .uninit      = split_uninit,
+    .inputs      = avfilter_af_asplit_inputs,
+    .outputs     = NULL,
+    .flags       = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
 };