summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 2e9448ea2b..173ac3c9a0 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4051,7 +4051,9 @@ static int init_input_thread(int i)
int ret;
InputFile *f = input_files[i];
- if (nb_input_files == 1)
+ if (f->thread_queue_size < 0)
+ f->thread_queue_size = (nb_input_files > 1 ? 8 : 0);
+ if (!f->thread_queue_size)
return 0;
if (f->ctx->pb ? !f->ctx->pb->seekable :
@@ -4105,7 +4107,7 @@ static int get_input_packet(InputFile *f, AVPacket *pkt)
}
#if HAVE_THREADS
- if (nb_input_files > 1)
+ if (f->thread_queue_size)
return get_input_packet_mt(f, pkt);
#endif
return av_read_frame(f->ctx, pkt);