mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg_filter: do not override -filter_threads with -threads
When both -filter_threads and -threads are specified, the latter takes effect. Since -threads is an encoder option and -filter_threads is a filter option, it makes sense for the -filter_threads to take precedence.
This commit is contained in:
parent
4a0d918c9e
commit
834b8ad8a3
@ -969,6 +969,11 @@ int configure_filtergraph(FilterGraph *fg)
|
|||||||
AVDictionaryEntry *e = NULL;
|
AVDictionaryEntry *e = NULL;
|
||||||
|
|
||||||
fg->graph->nb_threads = filter_nbthreads;
|
fg->graph->nb_threads = filter_nbthreads;
|
||||||
|
if (!fg->graph->nb_threads) {
|
||||||
|
e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
|
||||||
|
if (e)
|
||||||
|
av_opt_set(fg->graph, "threads", e->value, 0);
|
||||||
|
}
|
||||||
|
|
||||||
args[0] = 0;
|
args[0] = 0;
|
||||||
e = NULL;
|
e = NULL;
|
||||||
@ -1003,10 +1008,6 @@ int configure_filtergraph(FilterGraph *fg)
|
|||||||
}
|
}
|
||||||
if (strlen(args))
|
if (strlen(args))
|
||||||
args[strlen(args) - 1] = '\0';
|
args[strlen(args) - 1] = '\0';
|
||||||
|
|
||||||
e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
|
|
||||||
if (e)
|
|
||||||
av_opt_set(fg->graph, "threads", e->value, 0);
|
|
||||||
} else {
|
} else {
|
||||||
fg->graph->nb_threads = filter_complex_nbthreads;
|
fg->graph->nb_threads = filter_complex_nbthreads;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user