aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_filter.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-09-03 10:30:32 -0300
committerJames Almer <jamrial@gmail.com>2021-09-04 10:35:07 -0300
commit7453d3482a02452d67ca2fa2a2ed1e6094fdddeb (patch)
treef7be2b74c37d982e307b441d7293bbb5d58a6d8f /fftools/ffmpeg_filter.c
parentf599ae88c25d2c84c4f3be1abe30777b68e249d5 (diff)
downloadffmpeg-7453d3482a02452d67ca2fa2a2ed1e6094fdddeb.tar.gz
ffmpeg: let AVFilterGraph parse the filter_threads option
This way the CLI accepts for "filter_threads" the same values as for the libavcodec specific option "threads". Fixes FATE with THREADS=auto which was broken in bdc1bdf3f5. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r--fftools/ffmpeg_filter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 4b9ad3071b..6b7b6ca1b3 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -968,8 +968,11 @@ int configure_filtergraph(FilterGraph *fg)
char args[512];
AVDictionaryEntry *e = NULL;
- fg->graph->nb_threads = filter_nbthreads;
- if (!fg->graph->nb_threads) {
+ if (filter_nbthreads) {
+ ret = av_opt_set(fg->graph, "threads", filter_nbthreads, 0);
+ if (ret < 0)
+ goto fail;
+ } else {
e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
if (e)
av_opt_set(fg->graph, "threads", e->value, 0);