[FFmpeg-devel] [PATCH 06/14] lavfi/vf_decimate: use standard options parsing.
Nicolas George
nicolas.george at normalesup.org
Sat Mar 16 21:39:26 CET 2013
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavfilter/vf_decimate.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index f0e49c9..8f82d16 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -132,14 +132,6 @@ static int decimate_frame(AVFilterContext *ctx,
static av_cold int init(AVFilterContext *ctx, const char *args)
{
DecimateContext *decimate = ctx->priv;
- static const char *shorthand[] = { "max", "hi", "lo", "frac", NULL };
- int ret;
-
- decimate->class = &decimate_class;
- av_opt_set_defaults(decimate);
-
- if ((ret = av_opt_set_from_string(decimate, args, shorthand, "=", ":")) < 0)
- return ret;
av_log(ctx, AV_LOG_VERBOSE, "max_drop_count:%d hi:%d lo:%d frac:%f\n",
decimate->max_drop_count, decimate->hi, decimate->lo, decimate->frac);
@@ -251,6 +243,8 @@ static const AVFilterPad decimate_outputs[] = {
{ NULL }
};
+static const char *const shorthand[] = { "max", "hi", "lo", "frac", NULL };
+
AVFilter avfilter_vf_decimate = {
.name = "decimate",
.description = NULL_IF_CONFIG_SMALL("Remove near-duplicate frames."),
@@ -262,4 +256,5 @@ AVFilter avfilter_vf_decimate = {
.inputs = decimate_inputs,
.outputs = decimate_outputs,
.priv_class = &decimate_class,
+ .shorthand = shorthand,
};
--
1.7.10.4
More information about the ffmpeg-devel
mailing list