On Mon, Apr 12, 2021 at 12:22 PM <kevin.j.wheat...@gmail.com> wrote:
>
> From: Kevin Wheatley <kevin.j.wheat...@gmail.com>
>
> This fix moves the potential definition of _GNU_SOURCE prior to
> any includes of system header files as required by the documentation
> https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
>
> This corrects the CPU_COUNT macro availability, resulting in
> sched_getaffinity() being called on Linux systems. This then correctly
> returns the number of CPUs when run under containers and other cases
> where processor affinity has been setup prior to running FFmpeg
>

bump

As an FYI the issue is triggered because the inclusion of the other
system headers prior to the _GNU_SOURCE definition results in the
CPU_COUNT macro not being defined, and so the affinity based CPU
counting fails to be used and so the cpu count is incorrectly
returned.

Kevin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to