On Tue, 14 May 2013, Hendrik Leppkes wrote:

On Tue, May 14, 2013 at 1:15 PM, Martin Storsjö <[email protected]> wrote:
On Tue, 14 May 2013, Martin Storsjö wrote:

On Tue, 14 May 2013, Jean-Baptiste Kempf wrote:

---
libavcodec/w32pthreads.h |    8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/libavcodec/w32pthreads.h b/libavcodec/w32pthreads.h
index 91e7353..c58da49 100644
--- a/libavcodec/w32pthreads.h
+++ b/libavcodec/w32pthreads.h
@@ -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 */
--
1.7.10.4


Ok with me


For the record - this is enabled by default in MSVC 2010, but not in mingw
or mingw-w64. If this isn't desired in MSVC, one can always add
--extra-cflags='-D_WIN32_WINNT=0x510'.

I'll push the patch later today.

// Martin

Changing the default for MSVC might be risky if people are not aware of this.
Last night on IRC it sounded like 2010 would still target XP by
default, which would be fine, but changing the default to include
Vista+ functions may not be a good course of action yet.

Well, yeah. Technically it isn't changing any defaults but just making people more aware of what their current default setting is, but I agree with your conclusion.

Isn't there a define for windows store applications?

Yes, I guess that could be used as well.

Just to correct the records, 0x0501 is XP and 0x0502 is XP SP2 (the
sane option today),

Oh, right, sorry about that.

or 0x0400 is 2K, which iirc is the default in mingw right now.

2k is 0x0500, while 0x0400 is NT4.

In mingw.org, the default is 0x0400, while it is 0x0502 in mingw-w64 (at least in the version I have here).

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to