summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/compat/w32pthreads.h
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-26 16:49:15 -0500
committertrav90 <travawine@protonmail.ch>2018-04-26 16:49:15 -0500
commit8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298 (patch)
treec37da5241afd7cda6f92d394e14cef7d5dcbb4e5 /media/ffvpx/compat/w32pthreads.h
parent56a2df6b25bc93ea9a59b8e0bf8029f752f68573 (diff)
downloadUXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.gz
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.lz
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.xz
UXP-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.zip
[ffvpx] Update ffvp9/ffvp8 to 3.4.2-release
Structure of code was slightly modified so that it should be no longer necessary to re-generate the config_*.h files, greatly simplifying the resync process in the future.
Diffstat (limited to 'media/ffvpx/compat/w32pthreads.h')
-rw-r--r--media/ffvpx/compat/w32pthreads.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/media/ffvpx/compat/w32pthreads.h b/media/ffvpx/compat/w32pthreads.h
index 4ac2a995b..eeead6051 100644
--- a/media/ffvpx/compat/w32pthreads.h
+++ b/media/ffvpx/compat/w32pthreads.h
@@ -77,7 +77,7 @@ typedef struct pthread_cond_t {
static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg)
{
- pthread_t *h = arg;
+ pthread_t *h = (pthread_t*)arg;
h->ret = h->func(h->arg);
return 0;
}
@@ -270,7 +270,7 @@ static av_unused int pthread_cond_init(pthread_cond_t *cond, const void *unused_
}
/* non native condition variables */
- win32_cond = av_mallocz(sizeof(win32_cond_t));
+ win32_cond = (win32_cond_t*)av_mallocz(sizeof(win32_cond_t));
if (!win32_cond)
return ENOMEM;
cond->Ptr = win32_cond;
@@ -288,7 +288,7 @@ static av_unused int pthread_cond_init(pthread_cond_t *cond, const void *unused_
static av_unused int pthread_cond_destroy(pthread_cond_t *cond)
{
- win32_cond_t *win32_cond = cond->Ptr;
+ win32_cond_t *win32_cond = (win32_cond_t*)cond->Ptr;
/* native condition variables do not destroy */
if (cond_init)
return 0;
@@ -305,7 +305,7 @@ static av_unused int pthread_cond_destroy(pthread_cond_t *cond)
static av_unused int pthread_cond_broadcast(pthread_cond_t *cond)
{
- win32_cond_t *win32_cond = cond->Ptr;
+ win32_cond_t *win32_cond = (win32_cond_t*)cond->Ptr;
int have_waiter;
if (cond_broadcast) {
@@ -337,7 +337,7 @@ static av_unused int pthread_cond_broadcast(pthread_cond_t *cond)
static av_unused int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
- win32_cond_t *win32_cond = cond->Ptr;
+ win32_cond_t *win32_cond = (win32_cond_t*)cond->Ptr;
int last_waiter;
if (cond_wait) {
cond_wait(cond, mutex, INFINITE);
@@ -369,7 +369,7 @@ static av_unused int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mu
static av_unused int pthread_cond_signal(pthread_cond_t *cond)
{
- win32_cond_t *win32_cond = cond->Ptr;
+ win32_cond_t *win32_cond = (win32_cond_t*)cond->Ptr;
int have_waiter;
if (cond_signal) {
cond_signal(cond);
@@ -397,20 +397,20 @@ static av_unused int pthread_cond_signal(pthread_cond_t *cond)
static av_unused void w32thread_init(void)
{
#if _WIN32_WINNT < 0x0600
- HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll"));
+ HMODULE kernel_dll = GetModuleHandle(TEXT("kernel32.dll"));
/* if one is available, then they should all be available */
- cond_init =
- (void*)GetProcAddress(kernel_dll, "InitializeConditionVariable");
- cond_broadcast =
- (void*)GetProcAddress(kernel_dll, "WakeAllConditionVariable");
- cond_signal =
- (void*)GetProcAddress(kernel_dll, "WakeConditionVariable");
- cond_wait =
- (void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS");
- initonce_begin =
- (void*)GetProcAddress(kernel_dll, "InitOnceBeginInitialize");
- initonce_complete =
- (void*)GetProcAddress(kernel_dll, "InitOnceComplete");
+ cond_init = (void (WINAPI*)(pthread_cond_t *))
+ GetProcAddress(kernel_dll, "InitializeConditionVariable");
+ cond_broadcast = (void (WINAPI*)(pthread_cond_t *))
+ GetProcAddress(kernel_dll, "WakeAllConditionVariable");
+ cond_signal = (void (WINAPI*)(pthread_cond_t *))
+ GetProcAddress(kernel_dll, "WakeConditionVariable");
+ cond_wait = (BOOL (WINAPI*)(pthread_cond_t *, pthread_mutex_t *, DWORD))
+ GetProcAddress(kernel_dll, "SleepConditionVariableCS");
+ initonce_begin = (BOOL (WINAPI*)(pthread_once_t *, DWORD, BOOL *, void **))
+ GetProcAddress(kernel_dll, "InitOnceBeginInitialize");
+ initonce_complete = (BOOL (WINAPI*)(pthread_once_t *, DWORD, void *))
+ GetProcAddress(kernel_dll, "InitOnceComplete");
#endif
}