X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_deblock.c;h=2d91fe358ba611e7b15c5b726c1ae198122f64c7;hb=a04ad248a05e7b613abe09b3bb067f555108d794;hp=b2be1d6f076ef216a723655b3d65f849038e86d1;hpb=4225819c70161630f26b7129b63e6f3b3f90f59a;p=ffmpeg diff --git a/libavfilter/vf_deblock.c b/libavfilter/vf_deblock.c index b2be1d6f076..2d91fe358ba 100644 --- a/libavfilter/vf_deblock.c +++ b/libavfilter/vf_deblock.c @@ -367,8 +367,20 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return ff_filter_frame(outlink, out); } +static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, + char *res, int res_len, int flags) +{ + int ret; + + ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags); + if (ret < 0) + return ret; + + return config_output(ctx->outputs[0]); +} + #define OFFSET(x) offsetof(DeblockContext, x) -#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM static const AVOption deblock_options[] = { { "filter", "set type of filter", OFFSET(filter), AV_OPT_TYPE_INT, {.i64=STRONG},0, 1, FLAGS, "filter" }, @@ -403,7 +415,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(deblock); -AVFilter ff_vf_deblock = { +const AVFilter ff_vf_deblock = { .name = "deblock", .description = NULL_IF_CONFIG_SMALL("Deblock video."), .priv_size = sizeof(DeblockContext), @@ -412,4 +424,5 @@ AVFilter ff_vf_deblock = { .inputs = inputs, .outputs = outputs, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .process_command = process_command, };