]> git.sesse.net Git - ffmpeg/blobdiff - compat/w32pthreads.h
avcodec/libzvbi-teletextdec: Remove unused variable ret
[ffmpeg] / compat / w32pthreads.h
index 2aff72ae99cb03627d21208b34a9f4b686c6a1b0..c327962735828e80fe7f57894c79721f6c85d042 100644 (file)
 #include <windows.h>
 #include <process.h>
 
+#if _WIN32_WINNT < 0x0600 && defined(__MINGW32__)
+#undef MemoryBarrier
+#define MemoryBarrier __sync_synchronize
+#endif
+
 #include "libavutil/attributes.h"
 #include "libavutil/common.h"
 #include "libavutil/internal.h"
@@ -82,8 +87,13 @@ static av_unused int pthread_create(pthread_t *thread, const void *unused_attr,
 {
     thread->func   = start_routine;
     thread->arg    = arg;
+#if HAVE_WINRT
+    thread->handle = (void*)CreateThread(NULL, 0, win32thread_worker, thread,
+                                           0, NULL);
+#else
     thread->handle = (void*)_beginthreadex(NULL, 0, win32thread_worker, thread,
                                            0, NULL);
+#endif
     return !thread->handle;
 }