diff options
author | Michael Niedermayer <[email protected]> | 2013-03-20 21:41:22 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2013-03-20 21:41:26 +0100 |
commit | 426ebdf923f9826e456bb734299fa2d2b6199524 (patch) | |
tree | f30fd4ac99579f87dec2bb4df06e30cbb0ee8859 /libavfilter/vf_drawbox.c | |
parent | b853103fe0e59edc8970462abc6c181610ad9216 (diff) | |
parent | 2753d4ebf067593070ca4e9b3ea1dbe6ace23ba3 (diff) |
Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
lavfi/vf_yadif: use standard options parsing.
lavfi/vf_unsharp: use standard options parsing.
lavfi/vf_transpose: use standard options parsing.
lavfi/vf_pad: use standard options parsing.
lavfi/vf_fps: use standard options parsing.
lavfi/vf_fade: use standard options parsing.
lavi/vf_drawbox: use standard options parsing.
lavfi/vf_delogo: use standard options parsing.
lavfi/vf_decimate: use standard options parsing.
lavfi/vf_crop: use standard options parsing.
lavfi/af_volume: use standard options parsing.
lavfi/vf_tile: use standard options parsing.
lavfi/avf_concat: use standard options parsing.
lavfi: add common code to handle options parsing.
lavf/vobsub: free index pseudo-packet.
ffmpeg: fix freeing of sub2video frame.
lavfi: add sine audio source.
lavu/opt: add AV_OPT_TYPE_DURATION.
lavfi/concat: fix silence duration computation.
lavf/concatdec: support seeking.
Merged-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavfilter/vf_drawbox.c')
-rw-r--r-- | libavfilter/vf_drawbox.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 41601b9fab..b831182c8b 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -68,14 +68,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) { DrawBoxContext *drawbox = ctx->priv; uint8_t rgba_color[4]; - static const char *shorthand[] = { "x", "y", "w", "h", "color", "thickness", NULL }; - int ret; - - drawbox->class = &drawbox_class; - av_opt_set_defaults(drawbox); - - if ((ret = av_opt_set_from_string(drawbox, args, shorthand, "=", ":")) < 0) - return ret; if (!strcmp(drawbox->color_str, "invert")) drawbox->invert_color = 1; @@ -92,12 +84,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) return 0; } -static av_cold void uninit(AVFilterContext *ctx) -{ - DrawBoxContext *drawbox = ctx->priv; - av_opt_free(drawbox); -} - static int query_formats(AVFilterContext *ctx) { static const enum AVPixelFormat pix_fmts[] = { @@ -185,15 +171,17 @@ static const AVFilterPad avfilter_vf_drawbox_outputs[] = { { NULL } }; +static const char *const shorthand[] = { "x", "y", "w", "h", "color", "thickness", NULL }; + AVFilter avfilter_vf_drawbox = { .name = "drawbox", .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), .priv_size = sizeof(DrawBoxContext), .init = init, - .uninit = uninit, .query_formats = query_formats, .inputs = avfilter_vf_drawbox_inputs, .outputs = avfilter_vf_drawbox_outputs, .priv_class = &drawbox_class, + .shorthand = shorthand, }; |