[FFmpeg-cvslog] lavfi/color: drop support for old deprecated syntax

Stefano Sabatini git at videolan.org
Mon Jul 30 00:38:25 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sun Jul 29 16:20:14 2012 +0200| [e5d617aa6dfc57b00b2cf08390d93e5c6cf9645f] | committer: Stefano Sabatini

lavfi/color: drop support for old deprecated syntax

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

 doc/filters.texi         |    4 ----
 libavfilter/version.h    |    2 +-
 libavfilter/vsrc_color.c |   24 ------------------------
 3 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 97236b7..73895eb 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3635,10 +3635,6 @@ Provide an uniformly colored input.
 This source accepts list of options in the form of
 @var{key}=@var{value} pairs separated by ":".
 
-Alternatively, it accepts a string in the form
- at var{color}:@var{size}:@var{rate}, but this syntax is
-deprecated.
-
 Follows the description of the accepted parameters.
 
 @table @option
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 6b5fa89..b0a53f1 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
 
 #define LIBAVFILTER_VERSION_MAJOR  3
 #define LIBAVFILTER_VERSION_MINOR  5
-#define LIBAVFILTER_VERSION_MICRO 100
+#define LIBAVFILTER_VERSION_MICRO 101
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
                                                LIBAVFILTER_VERSION_MINOR, \
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index 1f26a50..dd44b8d 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -64,21 +64,11 @@ AVFILTER_DEFINE_CLASS(color);
 static av_cold int color_init(AVFilterContext *ctx, const char *args)
 {
     ColorContext *color = ctx->priv;
-    char color_string[128] = "black";
-    char frame_size  [128] = "320x240";
-    char frame_rate  [128] = "25";
     AVRational frame_rate_q;
-    char *colon = 0, *equal = 0;
     int ret = 0;
 
     color->class = &color_class;
 
-    if (args) {
-        colon = strchr(args, ':');
-        equal = strchr(args, '=');
-    }
-
-    if (!args || (equal && (!colon || equal < colon))) {
         av_opt_set_defaults(color);
         if ((ret = av_set_options_string(color, args, "=", ":")) < 0) {
             av_log(ctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args);
@@ -93,20 +83,6 @@ static av_cold int color_init(AVFilterContext *ctx, const char *args)
             ret = AVERROR(EINVAL);
             goto end;
         }
-    } else {
-        av_log(ctx, AV_LOG_WARNING, "Flat options syntax is deprecated, use key=value pairs.\n");
-        sscanf(args, "%127[^:]:%127[^:]:%127s", color_string, frame_size, frame_rate);
-        if (av_parse_video_size(&color->w, &color->h, frame_size) < 0) {
-            av_log(ctx, AV_LOG_ERROR, "Invalid frame size: %s\n", frame_size);
-            return AVERROR(EINVAL);
-        }
-        if (av_parse_video_rate(&frame_rate_q, frame_rate) < 0) {
-            av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: %s\n", frame_rate);
-            return AVERROR(EINVAL);
-        }
-        if (av_parse_color(color->color_rgba, color_string, -1, ctx) < 0)
-            return AVERROR(EINVAL);
-    }
 
     color->time_base.num = frame_rate_q.den;
     color->time_base.den = frame_rate_q.num;



More information about the ffmpeg-cvslog mailing list