diff --git a/codec/decoder/core/src/wels_decoder_thread.cpp b/codec/decoder/core/src/wels_decoder_thread.cpp index fdf4b4d70..a607f9e1a 100644 --- a/codec/decoder/core/src/wels_decoder_thread.cpp +++ b/codec/decoder/core/src/wels_decoder_thread.cpp @@ -115,7 +115,10 @@ int SemWait (SWelsDecSemphore* s, int32_t timeout) { } void SemRelease (SWelsDecSemphore* s, long* prevcount) { - ReleaseSemaphore (s->h, 1, prevcount); + LONG _prevcount; + + ReleaseSemaphore (s->h, 1, &_prevcount); + *prevcount = _prevcount; } void SemDestroy (SWelsDecSemphore* s) { diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp index 08e037a3d..445978641 100644 --- a/codec/decoder/plus/src/welsDecoderExt.cpp +++ b/codec/decoder/plus/src/welsDecoderExt.cpp @@ -90,7 +90,7 @@ namespace WelsDec { ***************************************************************************/ DECLARE_PROCTHREAD (pThrProcInit, p) { SWelsDecThreadInfo* sThreadInfo = (SWelsDecThreadInfo*)p; -#if defined(WIN32) +#if defined(WIN32) && !defined(__CYGWIN__) _alloca (WELS_DEC_MAX_THREAD_STACK_SIZE * (sThreadInfo->uiThrNum + 1)); #endif return sThreadInfo->pThrProcMain (p); diff --git a/meson.build b/meson.build index a0dfd2196..0ceb55c77 100644 --- a/meson.build +++ b/meson.build @@ -112,7 +112,7 @@ if ['linux', 'freebsd', 'android', 'ios', 'darwin'].contains(system) if ['ios', 'darwin', 'android'].contains(system) cpp_lib = '-lc++' endif -elif system == 'windows' +elif ['windows', 'cygwin'].contains(system) if cpu_family == 'x86' asm_format = 'win32' asm_args += ['-DPREFIX', '-DX86_32']