Commit faac955d authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c360fb17'

* commit 'c360fb17':
  win32: Do not use GetProcAddress when compiled for Vista+
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 2afcd167 c360fb17
...@@ -257,6 +257,7 @@ static void pthread_cond_signal(pthread_cond_t *cond) ...@@ -257,6 +257,7 @@ static void pthread_cond_signal(pthread_cond_t *cond)
static void w32thread_init(void) static void w32thread_init(void)
{ {
#if _WIN32_WINNT < 0x0600
HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll")); HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll"));
/* if one is available, then they should all be available */ /* if one is available, then they should all be available */
cond_init = cond_init =
...@@ -267,6 +268,13 @@ static void w32thread_init(void) ...@@ -267,6 +268,13 @@ static void w32thread_init(void)
(void*)GetProcAddress(kernel_dll, "WakeConditionVariable"); (void*)GetProcAddress(kernel_dll, "WakeConditionVariable");
cond_wait = cond_wait =
(void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS"); (void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS");
#else
cond_init = InitializeConditionVariable;
cond_broadcast = WakeAllConditionVariable;
cond_signal = WakeConditionVariable;
cond_wait = SleepConditionVariableCS;
#endif
} }
#endif /* AVCODEC_W32PTHREADS_H */ #endif /* AVCODEC_W32PTHREADS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment