[FFmpeg-cvslog] lavfi/testsrc: move color options to the color scope filter definition.

Clément Bœsch git at videolan.org
Thu May 23 17:30:10 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu May 23 13:54:08 2013 +0200| [288f9166430285224c689906d002499096acc1a9] | committer: Clément Bœsch

lavfi/testsrc: move color options to the color scope filter definition.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=288f9166430285224c689906d002499096acc1a9
---

 libavfilter/vsrc_testsrc.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 8c4c51a..a8a45a2 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -84,15 +84,6 @@ typedef struct {
     { "sar",      "set video sample aspect ratio", OFFSET(sar), AV_OPT_TYPE_RATIONAL, {.dbl= 1},  0, INT_MAX, FLAGS },
 
 
-static const AVOption color_options[] = {
-    /* only used by color */
-    { "color", "set color", OFFSET(color_rgba), AV_OPT_TYPE_COLOR, {.str = "black"}, CHAR_MIN, CHAR_MAX, FLAGS },
-    { "c",     "set color", OFFSET(color_rgba), AV_OPT_TYPE_COLOR, {.str = "black"}, CHAR_MIN, CHAR_MAX, FLAGS },
-
-    COMMON_OPTIONS
-    { NULL },
-};
-
 static const AVOption options[] = {
     COMMON_OPTIONS
     /* only used by testsrc */
@@ -186,6 +177,13 @@ static int request_frame(AVFilterLink *outlink)
 
 #if CONFIG_COLOR_FILTER
 
+static const AVOption color_options[] = {
+    { "color", "set color", OFFSET(color_rgba), AV_OPT_TYPE_COLOR, {.str = "black"}, CHAR_MIN, CHAR_MAX, FLAGS },
+    { "c",     "set color", OFFSET(color_rgba), AV_OPT_TYPE_COLOR, {.str = "black"}, CHAR_MIN, CHAR_MAX, FLAGS },
+    COMMON_OPTIONS
+    { NULL }
+};
+
 AVFILTER_DEFINE_CLASS(color);
 
 static void color_fill_picture(AVFilterContext *ctx, AVFrame *picref)



More information about the ffmpeg-cvslog mailing list