mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-05 23:58:59 +02:00
win32: Do not use GetProcAddress when compiled for Vista+
Instead link directly to the condition variable functions. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
0b6899f154
commit
c360fb174b
@ -256,6 +256,7 @@ static void pthread_cond_signal(pthread_cond_t *cond)
|
||||
|
||||
static void w32thread_init(void)
|
||||
{
|
||||
#if _WIN32_WINNT < 0x0600
|
||||
HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll"));
|
||||
/* if one is available, then they should all be available */
|
||||
cond_init =
|
||||
@ -266,6 +267,13 @@ static void w32thread_init(void)
|
||||
(void*)GetProcAddress(kernel_dll, "WakeConditionVariable");
|
||||
cond_wait =
|
||||
(void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS");
|
||||
#else
|
||||
cond_init = InitializeConditionVariable;
|
||||
cond_broadcast = WakeAllConditionVariable;
|
||||
cond_signal = WakeConditionVariable;
|
||||
cond_wait = SleepConditionVariableCS;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif /* AVCODEC_W32PTHREADS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user