[FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

Hendrik Leppkes h.leppkes at gmail.com
Mon Jun 17 11:45:23 EEST 2024


On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili <quinkblack at foxmail.com> wrote:
>
>
>
> > On Jun 17, 2024, at 15:05, Anton Khirnov <anton at khirnov.net> wrote:
> >
> > Quoting Zhao Zhili (2024-06-17 07:19:26)
> >> From: Zhao Zhili <zhilizhao at tencent.com>
> >>
> >> When thread_count be zero, it will be run on current thread like
> >> !HAVE_THREADS.
> >
> > Other APIs treat zero to mean "auto".
>
> executor don’t detect cpu cores by itself. It’s more low level than libavcodec.
>
> Zero thread is zero thread, literally. If we use thread_count one to mean
> run on current thread, how to create a single thread then?

Whats the point of creating a single thread? Does the main thread ever
do something else in the meantime, or does it just wait for the job
anyway?

- Hendrik


More information about the ffmpeg-devel mailing list