Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-03-17 00:27:41 +0400
committerNicolas George <nicolas.george@normalesup.org>2013-03-21 00:13:56 +0400
commit392ec7ec1cf2e0598f56a3985b477f21541bdc81 (patch)
tree5abd846c5214a596843f38bb3a23fea133fed1ce /libavfilter/vf_pad.c
parentb201c167d096a767adcac914b6e833d1db7d82ea (diff)
lavfi/vf_pad: use standard options parsing.
Diffstat (limited to 'libavfilter/vf_pad.c')
-rw-r--r--libavfilter/vf_pad.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 4e1e3b0703..ed979bbe10 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -111,14 +111,6 @@ AVFILTER_DEFINE_CLASS(pad);
static av_cold int init(AVFilterContext *ctx, const char *args)
{
PadContext *pad = ctx->priv;
- static const char *shorthand[] = { "width", "height", "x", "y", "color", NULL };
- int ret;
-
- pad->class = &pad_class;
- av_opt_set_defaults(pad);
-
- if ((ret = av_opt_set_from_string(pad, args, shorthand, "=", ":")) < 0)
- return ret;
if (av_parse_color(pad->rgba_color, pad->color_str, -1, ctx) < 0)
return AVERROR(EINVAL);
@@ -126,12 +118,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return 0;
}
-static av_cold void uninit(AVFilterContext *ctx)
-{
- PadContext *pad = ctx->priv;
- av_opt_free(pad);
-}
-
static int config_input(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
@@ -416,17 +402,19 @@ static const AVFilterPad avfilter_vf_pad_outputs[] = {
{ NULL }
};
+static const char *const shorthand[] = { "width", "height", "x", "y", "color", NULL };
+
AVFilter avfilter_vf_pad = {
.name = "pad",
.description = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."),
.priv_size = sizeof(PadContext),
.init = init,
- .uninit = uninit,
.query_formats = query_formats,
.inputs = avfilter_vf_pad_inputs,
.outputs = avfilter_vf_pad_outputs,
.priv_class = &pad_class,
+ .shorthand = shorthand,
};