mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user