diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-04-08 13:04:02 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-04-08 13:04:02 +0400 |
commit | 018cc6f0266a2ca5cae507491aeeb37834a144b7 (patch) | |
tree | 03dab40b880ca5721641043c66d392096b765fb1 /libavfilter | |
parent | 1f97dfb77f27e8eb11b419eedf27016237401f90 (diff) |
lavfi/histogram: use standard options parsing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_histogram.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index 37e198625c..b9cba6be1a 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -73,20 +73,6 @@ static const AVOption histogram_options[] = { AVFILTER_DEFINE_CLASS(histogram); -static av_cold int init(AVFilterContext *ctx, const char *args) -{ - HistogramContext *h = ctx->priv; - int ret; - - h->class = &histogram_class; - av_opt_set_defaults(h); - - if ((ret = (av_set_options_string(h, args, "=", ":"))) < 0) - return ret; - - return 0; -} - static const enum AVPixelFormat color_pix_fmts[] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE @@ -306,13 +292,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return 0; } -static av_cold void uninit(AVFilterContext *ctx) -{ - HistogramContext *h = ctx->priv; - - av_opt_free(h); -} - static const AVFilterPad inputs[] = { { .name = "default", @@ -332,14 +311,15 @@ static const AVFilterPad outputs[] = { { NULL } }; +static const char *const shorthand[] = { NULL }; + AVFilter avfilter_vf_histogram = { .name = "histogram", .description = NULL_IF_CONFIG_SMALL("Compute and draw a histogram."), .priv_size = sizeof(HistogramContext), - .init = init, - .uninit = uninit, .query_formats = query_formats, .inputs = inputs, .outputs = outputs, .priv_class = &histogram_class, + .shorthand = shorthand, }; |