0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

win32/pthread: fix calculation error in pthread_cond_timedwait

closes #12699
This commit is contained in:
sfan5 2023-10-21 15:56:01 +02:00
parent 490af95c10
commit 97afea441b

View File

@ -128,7 +128,7 @@ int pthread_cond_timedwait(pthread_cond_t *restrict cond,
timeout_ms = INFINITE; timeout_ms = INFINITE;
} else if (abstime->tv_sec >= ts.tv_sec) { } else if (abstime->tv_sec >= ts.tv_sec) {
int64_t msec = (abstime->tv_sec - ts.tv_sec) * INT64_C(1000) + int64_t msec = (abstime->tv_sec - ts.tv_sec) * INT64_C(1000) +
(abstime->tv_nsec - ts.tv_nsec) / INT64_C(10000000); (abstime->tv_nsec - ts.tv_nsec) / INT64_C(1000000);
if (msec > ULONG_MAX) { if (msec > ULONG_MAX) {
timeout_ms = INFINITE; timeout_ms = INFINITE;
} else if (msec > 0) { } else if (msec > 0) {