aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_demux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-11-08 12:07:11 +0100
committerAnton Khirnov <anton@khirnov.net>2022-11-16 08:41:14 +0100
commit822da7a31746b8a5ec92c854b52bc767e6e98e8a (patch)
tree5b8fd6623575e6a552d3839469634e12f79fcaa9 /fftools/ffmpeg_demux.c
parentc15eb2773a5381e0aef209f22713d505bdad6f02 (diff)
downloadffmpeg-822da7a31746b8a5ec92c854b52bc767e6e98e8a.tar.gz
fftools/ffmpeg: make demuxing with one file always blocking
Diffstat (limited to 'fftools/ffmpeg_demux.c')
-rw-r--r--fftools/ffmpeg_demux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 94fd604fd9..b3eb8c66cc 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -368,8 +368,9 @@ static int thread_start(Demuxer *d)
if (d->thread_queue_size <= 0)
d->thread_queue_size = (nb_input_files > 1 ? 8 : 1);
- if (f->ctx->pb ? !f->ctx->pb->seekable :
- strcmp(f->ctx->iformat->name, "lavfi"))
+ if (nb_input_files > 1 &&
+ (f->ctx->pb ? !f->ctx->pb->seekable :
+ strcmp(f->ctx->iformat->name, "lavfi")))
d->non_blocking = 1;
ret = av_thread_message_queue_alloc(&d->in_thread_queue,
d->thread_queue_size, sizeof(DemuxMsg));