]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/f_settb.c
ff: fix case where image does not have alpha channel
[ffmpeg] / libavfilter / f_settb.c
index 3430e70b6ccc12e01958e8099448b1aaa14d2fbd..f42a15c78d10817eb27aeb0cd89b857ca6059a63 100644 (file)
  * Set timebase for the output link.
  */
 
+#include <inttypes.h>
+#include <stdio.h>
+
 #include "libavutil/avstring.h"
 #include "libavutil/eval.h"
+#include "libavutil/internal.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/rational.h"
 #include "avfilter.h"
@@ -133,6 +137,26 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
 }
 
 #if CONFIG_SETTB_FILTER
+static const AVFilterPad avfilter_vf_settb_inputs[] = {
+    {
+        .name             = "default",
+        .type             = AVMEDIA_TYPE_VIDEO,
+        .get_video_buffer = ff_null_get_video_buffer,
+        .start_frame      = start_frame,
+        .end_frame        = ff_null_end_frame
+    },
+    { NULL }
+};
+
+static const AVFilterPad avfilter_vf_settb_outputs[] = {
+    {
+        .name         = "default",
+        .type         = AVMEDIA_TYPE_VIDEO,
+        .config_props = config_output_props,
+    },
+    { NULL }
+};
+
 AVFilter avfilter_vf_settb = {
     .name      = "settb",
     .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."),
@@ -140,20 +164,8 @@ AVFilter avfilter_vf_settb = {
 
     .priv_size = sizeof(SetTBContext),
 
-    .inputs    = (const AVFilterPad[]) {
-        { .name             = "default",
-          .type             = AVMEDIA_TYPE_VIDEO,
-          .get_video_buffer = ff_null_get_video_buffer,
-          .start_frame      = start_frame,
-          .end_frame        = ff_null_end_frame },
-        { .name = NULL }
-    },
-    .outputs   = (const AVFilterPad[]) {
-        { .name            = "default",
-          .type            = AVMEDIA_TYPE_VIDEO,
-          .config_props    = config_output_props, },
-        { .name = NULL}
-    },
+    .inputs    = avfilter_vf_settb_inputs,
+    .outputs   = avfilter_vf_settb_outputs,
 };
 #endif