aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_opt.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-07-04 23:43:12 +0200
committerMarton Balint <cus@passwd.hu>2020-07-29 23:10:12 +0200
commit53a4620fbae20b640d7fd75a64a6d3ff6dcc8b43 (patch)
tree59e21ad899a8dc19325f2d58bf805b64a9b97333 /fftools/ffmpeg_opt.c
parent6ceaeecaf562020f25beab0614157fb2dae32391 (diff)
downloadffmpeg-53a4620fbae20b640d7fd75a64a6d3ff6dcc8b43.tar.gz
fftools/ffmpeg: make specifying thread_queue_size turn on threaded input
Threaded input can increase smoothness of e.g. x11grab significantly. Before this patch, in order to activate threaded input the user had to specify a "dummy" additional input, with this change it is no longer required. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'fftools/ffmpeg_opt.c')
-rw-r--r--fftools/ffmpeg_opt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 9d1489ce01..853550a142 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -228,6 +228,7 @@ static void init_options(OptionsContext *o)
o->limit_filesize = UINT64_MAX;
o->chapters_input_file = INT_MAX;
o->accurate_seek = 1;
+ o->thread_queue_size = -1;
}
static int show_hwaccels(void *optctx, const char *opt, const char *arg)
@@ -1270,7 +1271,7 @@ static int open_input_file(OptionsContext *o, const char *filename)
f->duration = 0;
f->time_base = (AVRational){ 1, 1 };
#if HAVE_THREADS
- f->thread_queue_size = o->thread_queue_size > 0 ? o->thread_queue_size : 8;
+ f->thread_queue_size = o->thread_queue_size;
#endif
/* check if all codec options have been used */