From 2a28712b44b0b462a33ee6e91c98e8e19549fede Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Apr 2018 15:55:53 +0200 Subject: f_lavfi: support setting common filter options like "threads" AVFilterContext instances support some additional AVOptions over the actual filter. This includes useful options like "threads". We didn't support setting those for the "direct" wrapper (--vf=yadif:threads=1 failed). Change this. It requires setting options on the AVFilterContext directly, except the code for positional parameters still needs to access the actual filter's AVOptions. --- filters/f_lavfi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'filters') diff --git a/filters/f_lavfi.c b/filters/f_lavfi.c index 2c01eaf59c..66e045eb2c 100644 --- a/filters/f_lavfi.c +++ b/filters/f_lavfi.c @@ -271,7 +271,8 @@ static void precreate_graph(struct lavfi *c, bool first_init) goto error; } - if (mp_set_avopts(c->log, filter->priv, c->direct_filter_opts) < 0) + if (mp_set_avopts_pos(c->log, filter, filter->priv, + c->direct_filter_opts) < 0) goto error; if (avfilter_init_str(filter, NULL) < 0) { -- cgit v1.2.3