mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/udp: support w32pthreads compat
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
60e2634662
commit
0830e9116f
|
@ -63,6 +63,9 @@ typedef CONDITION_VARIABLE pthread_cond_t;
|
||||||
#define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0)
|
#define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0)
|
||||||
#define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE)
|
#define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE)
|
||||||
|
|
||||||
|
#define PTHREAD_CANCEL_ENABLE 1
|
||||||
|
#define PTHREAD_CANCEL_DISABLE 0
|
||||||
|
|
||||||
static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg)
|
static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg)
|
||||||
{
|
{
|
||||||
pthread_t *h = (pthread_t*)arg;
|
pthread_t *h = (pthread_t*)arg;
|
||||||
|
@ -180,4 +183,9 @@ static inline int pthread_cond_signal(pthread_cond_t *cond)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int pthread_setcancelstate(int state, int *oldstate)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* COMPAT_W32PTHREADS_H */
|
#endif /* COMPAT_W32PTHREADS_H */
|
||||||
|
|
|
@ -61,8 +61,13 @@
|
||||||
#define IPPROTO_UDPLITE 136
|
#define IPPROTO_UDPLITE 136
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_W32THREADS
|
||||||
|
#undef HAVE_PTHREAD_CANCEL
|
||||||
|
#define HAVE_PTHREAD_CANCEL 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_PTHREAD_CANCEL
|
#if HAVE_PTHREAD_CANCEL
|
||||||
#include <pthread.h>
|
#include "libavutil/thread.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IPV6_ADD_MEMBERSHIP
|
#ifndef IPV6_ADD_MEMBERSHIP
|
||||||
|
|
Loading…
Reference in New Issue