[FFmpeg-devel] [PATCH] compat/w32pthreads: propagate the return value of SleepConditionVariableSRW()

James Almer jamrial at gmail.com
Fri Jan 17 03:41:20 EET 2020


Signed-off-by: James Almer <jamrial at gmail.com>
---
 compat/w32pthreads.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index 21acfd2ba1..1ac4267c92 100644
--- a/compat/w32pthreads.h
+++ b/compat/w32pthreads.h
@@ -152,8 +152,7 @@ static inline int pthread_cond_broadcast(pthread_cond_t *cond)
 
 static inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
 {
-    SleepConditionVariableSRW(cond, mutex, INFINITE, 0);
-    return 0;
+    return !SleepConditionVariableSRW(cond, mutex, INFINITE, 0);
 }
 
 static inline int pthread_cond_signal(pthread_cond_t *cond)
-- 
2.24.1



More information about the ffmpeg-devel mailing list