diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-03-24 11:39:00 +0400 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-03-24 15:26:24 +0400 |
commit | 3ac77f67afcdfc941c21d48914d0d5456384bfbf (patch) | |
tree | a4c9a745509e62b42de7025d34740a18e60ba09e /libavfilter | |
parent | 4c6f08bd8f3c6e4847e5791cd95e17c1016e30db (diff) |
lavfi/apad: use standard options parsing.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_apad.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c index b4a0fc8509..3c972e9d40 100644 --- a/libavfilter/af_apad.c +++ b/libavfilter/af_apad.c @@ -58,17 +58,9 @@ AVFILTER_DEFINE_CLASS(apad); static av_cold int init(AVFilterContext *ctx, const char *args) { - int ret; APadContext *apad = ctx->priv; - apad->class = &apad_class; apad->next_pts = AV_NOPTS_VALUE; - - av_opt_set_defaults(apad); - - if ((ret = av_opt_set_from_string(apad, args, NULL, "=", ":")) < 0) - return ret; - if (apad->whole_len && apad->pad_len) { av_log(ctx, AV_LOG_ERROR, "Both whole and pad length are set, this is not possible\n"); return AVERROR(EINVAL); @@ -152,6 +144,8 @@ static const AVFilterPad apad_outputs[] = { { NULL }, }; +static const char *const shorthand[] = { NULL }; + AVFilter avfilter_af_apad = { .name = "apad", .description = NULL_IF_CONFIG_SMALL("Pad audio with silence."), @@ -160,4 +154,5 @@ AVFilter avfilter_af_apad = { .inputs = apad_inputs, .outputs = apad_outputs, .priv_class = &apad_class, + .shorthand = shorthand, }; |