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.
This commit is contained in:
wm4
2018-04-27 15:55:53 +02:00
committed by Jan Ekström
parent fff5fda74b
commit 2a28712b44
3 changed files with 12 additions and 3 deletions

View File

@@ -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) {