Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-11-24 18:14:27 +0300
committerPaul B Mahol <onemda@gmail.com>2016-11-24 18:27:55 +0300
commit8f5a2bed5eabd423db4a05521a96b71babeff332 (patch)
tree0621452ce582f7c775f7b58563df3b21616f6abf /ffmpeg_filter.c
parent995512328ed84bb737bc364e4ef6fba1994f062a (diff)
ffmpeg_filter: fix several logic failures
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>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r--ffmpeg_filter.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 7b29e0cf69..006401476e 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -39,9 +39,6 @@
#include "libavutil/imgutils.h"
#include "libavutil/samplefmt.h"
-int filter_nbthreads = -1;
-int filter_complex_nbthreads = -1;
-
static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum AVCodecID codec_id, const enum AVPixelFormat default_formats[])
{
static const enum AVPixelFormat mjpeg_formats[] =
@@ -993,7 +990,7 @@ int configure_filtergraph(FilterGraph *fg)
char args[512];
AVDictionaryEntry *e = NULL;
- fg->graph->nb_threads = filter_complex_nbthreads;
+ fg->graph->nb_threads = filter_nbthreads;
args[0] = 0;
while ((e = av_dict_get(ost->sws_dict, "", e,
@@ -1026,7 +1023,7 @@ int configure_filtergraph(FilterGraph *fg)
if (e)
av_opt_set(fg->graph, "threads", e->value, 0);
} else {
- fg->graph->nb_threads = filter_nbthreads;
+ fg->graph->nb_threads = filter_complex_nbthreads;
}
if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)