--- common/osdep.h.orig 2021-06-13 20:43:57.000000000 +0800 +++ common/osdep.h 2021-09-09 13:22:28.067168000 +0800 @@ -568,8 +568,13 @@ #define x264_lower_thread_priority(p)\ { UNUSED status_t nice_ret = set_thread_priority( find_thread( NULL ), B_LOW_PRIORITY ); } #else +#if 0 +// BUG: Don't use nice(3), it will affect the whole process, not only the calling thread! #include #define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); } +#else +#define x264_lower_thread_priority(p) +#endif #endif /* SYS_WINDOWS */ #elif HAVE_WIN32THREAD #define x264_lower_thread_priority(p) SetThreadPriority( GetCurrentThread(), X264_MAX( -2, -p ) )