fftools/ffmpeg: make demuxing with one file always blocking

This commit is contained in:
Anton Khirnov 2022-11-08 12:07:11 +01:00
parent c15eb2773a
commit 822da7a317
1 changed files with 3 additions and 2 deletions

View File

@ -368,8 +368,9 @@ static int thread_start(Demuxer *d)
if (d->thread_queue_size <= 0) if (d->thread_queue_size <= 0)
d->thread_queue_size = (nb_input_files > 1 ? 8 : 1); d->thread_queue_size = (nb_input_files > 1 ? 8 : 1);
if (f->ctx->pb ? !f->ctx->pb->seekable : if (nb_input_files > 1 &&
strcmp(f->ctx->iformat->name, "lavfi")) (f->ctx->pb ? !f->ctx->pb->seekable :
strcmp(f->ctx->iformat->name, "lavfi")))
d->non_blocking = 1; d->non_blocking = 1;
ret = av_thread_message_queue_alloc(&d->in_thread_queue, ret = av_thread_message_queue_alloc(&d->in_thread_queue,
d->thread_queue_size, sizeof(DemuxMsg)); d->thread_queue_size, sizeof(DemuxMsg));