[FFmpeg-cvslog] lavfi/mptestsrc: switch to an AVOptions-based system.

Clément Bœsch git at videolan.org
Thu Apr 11 00:42:13 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Apr 10 23:29:19 2013 +0200| [4ecee69b20a7ee60fba6cb53ff45d95a015df05b] | committer: Clément Bœsch

lavfi/mptestsrc: switch to an AVOptions-based system.

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

 doc/filters.texi             |    3 +--
 libavfilter/avfilter.c       |    1 +
 libavfilter/vsrc_mptestsrc.c |    6 ------
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 5dfe5a1..f68b46a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -5992,8 +5992,7 @@ Generate various test patterns, as generated by the MPlayer test filter.
 The size of the generated video is fixed, and is 256x256.
 This source is useful in particular for testing encoding features.
 
-This source accepts an optional sequence of @var{key}=@var{value} pairs,
-separated by ":". The description of the accepted options follows.
+This source accepts the following options:
 
 @table @option
 
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index fbf2eec..6746dad 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -685,6 +685,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
         !strcmp(filter->filter->name, "lutyuv"     ) ||
         !strcmp(filter->filter->name, "lutrgb"     ) ||
         !strcmp(filter->filter->name, "mandelbrot" ) ||
+        !strcmp(filter->filter->name, "mptestsrc"  ) ||
         !strcmp(filter->filter->name, "negate"     ) ||
         !strcmp(filter->filter->name, "overlay"    ) ||
         !strcmp(filter->filter->name, "pad"        ) ||
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index 9f1c46f..e234108 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -262,12 +262,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
     int64_t duration = -1;
     int ret;
 
-    test->class = &mptestsrc_class;
-    av_opt_set_defaults(test);
-
-    if ((ret = (av_set_options_string(test, args, "=", ":"))) < 0)
-        return ret;
-
     if ((test->duration) && (ret = av_parse_time(&duration, test->duration, 1)) < 0) {
         av_log(ctx, AV_LOG_ERROR, "Invalid duration: '%s'\n", test->duration);
         return ret;



More information about the ffmpeg-cvslog mailing list