After this commit, is is expected that WelsEventSignal decrements the integer - but this wasn't done on windows.
Showing the changes to codec/common/src/WelsThreadLib.cpp (1 of 1 file). Show all
Unified · Split
| @@ -141,8 +141,11 @@ WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* event, const char* event_na · 140 unmodified lines | |||
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event, WELS_MUTEX *pMutex, int* iCondition) { | 143 | WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event, WELS_MUTEX *pMutex, int* iCondition) { |
| 144 | if (SetEvent (*event)) { | 144 | (*iCondition) --; |
| 145 | return WELS_THREAD_ERROR_OK; | 145 | if ((*iCondition) <= 0) { |
| 146 | if (SetEvent (*event)) { | ||
| 147 | return WELS_THREAD_ERROR_OK; | ||
| 148 | } | ||
| 146 | } | 149 | } |
| 147 | return WELS_THREAD_ERROR_GENERAL; | 150 | return WELS_THREAD_ERROR_GENERAL; |
| 148 | } | 151 | } |