Move global thread variables to better place.
Use correct variable for simple and complex filtergraphs.
This makes number of threads set per filter work again.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
... | ... |
@@ -39,9 +39,6 @@ |
39 | 39 |
#include "libavutil/imgutils.h" |
40 | 40 |
#include "libavutil/samplefmt.h" |
41 | 41 |
|
42 |
-int filter_nbthreads = -1; |
|
43 |
-int filter_complex_nbthreads = -1; |
|
44 |
- |
|
45 | 42 |
static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum AVCodecID codec_id, const enum AVPixelFormat default_formats[]) |
46 | 43 |
{ |
47 | 44 |
static const enum AVPixelFormat mjpeg_formats[] = |
... | ... |
@@ -993,7 +990,7 @@ int configure_filtergraph(FilterGraph *fg) |
993 | 993 |
char args[512]; |
994 | 994 |
AVDictionaryEntry *e = NULL; |
995 | 995 |
|
996 |
- fg->graph->nb_threads = filter_complex_nbthreads; |
|
996 |
+ fg->graph->nb_threads = filter_nbthreads; |
|
997 | 997 |
|
998 | 998 |
args[0] = 0; |
999 | 999 |
while ((e = av_dict_get(ost->sws_dict, "", e, |
... | ... |
@@ -1026,7 +1023,7 @@ int configure_filtergraph(FilterGraph *fg) |
1026 | 1026 |
if (e) |
1027 | 1027 |
av_opt_set(fg->graph, "threads", e->value, 0); |
1028 | 1028 |
} else { |
1029 |
- fg->graph->nb_threads = filter_nbthreads; |
|
1029 |
+ fg->graph->nb_threads = filter_complex_nbthreads; |
|
1030 | 1030 |
} |
1031 | 1031 |
|
1032 | 1032 |
if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0) |