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

Clément Bœsch git at videolan.org
Thu Apr 11 14:48:32 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu Apr 11 14:48:19 2013 +0200| [ab4afcb85b3ac23da3bce7fd9bc70d11b8bb28a4] | committer: Clément Bœsch

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

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

 doc/filters.texi             |    4 +---
 libavfilter/avfilter.c       |    1 -
 libavfilter/vf_blackdetect.c |   15 ---------------
 3 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 6356e74..75dd2de 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1865,9 +1865,7 @@ duration of the detected black interval expressed in seconds.
 In order to display the output lines, you need to set the loglevel at
 least to the AV_LOG_INFO value.
 
-This filter accepts a list of options in the form of
- at var{key}=@var{value} pairs separated by ":". A description of the
-accepted options follows.
+The filter accepts the following options:
 
 @table @option
 @item black_min_duration, d
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 5604ba5..3c37dee 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -682,7 +682,6 @@ static const char *const filters_left_to_update[] = {
     "astreamsync",
     "atempo",
     "bbox",
-    "blackdetect",
     "buffer",
     "flite",
     "hue",
diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c
index e8af624..9c9e6b4 100644
--- a/libavfilter/vf_blackdetect.c
+++ b/libavfilter/vf_blackdetect.c
@@ -82,20 +82,6 @@ static int query_formats(AVFilterContext *ctx)
     return 0;
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
-{
-    int ret;
-    BlackDetectContext *blackdetect = ctx->priv;
-
-    blackdetect->class = &blackdetect_class;
-    av_opt_set_defaults(blackdetect);
-
-    if ((ret = av_set_options_string(blackdetect, args, "=", ":")) < 0)
-        return ret;
-
-    return 0;
-}
-
 static int config_input(AVFilterLink *inlink)
 {
     AVFilterContext *ctx = inlink->dst;
@@ -211,7 +197,6 @@ AVFilter avfilter_vf_blackdetect = {
     .name          = "blackdetect",
     .description   = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),
     .priv_size     = sizeof(BlackDetectContext),
-    .init          = init,
     .query_formats = query_formats,
     .inputs        = blackdetect_inputs,
     .outputs       = blackdetect_outputs,



More information about the ffmpeg-cvslog mailing list