[FFmpeg-devel] [PATCH] w32threads: Make pthread_cond_wait follow POSIX

Derek Buitenhuis derek.buitenhuis at gmail.com
Tue Apr 3 23:50:11 CEST 2012


pthread_cond_wait is supposed to return an integer,
and indeed does sometimes. Fix its function declaration
to match its behavior and POSIX.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavcodec/w32pthreads.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/w32pthreads.h b/libavcodec/w32pthreads.h
index 70b84cf..ae6ceb9 100644
--- a/libavcodec/w32pthreads.h
+++ b/libavcodec/w32pthreads.h
@@ -194,13 +194,13 @@ static void pthread_cond_broadcast(pthread_cond_t *cond)
     pthread_mutex_unlock(&win32_cond->mtx_broadcast);
 }
 
-static void pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
+static int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
 {
     win32_cond_t *win32_cond = cond->ptr;
     int last_waiter;
     if (cond_wait) {
         cond_wait(cond, mutex, INFINITE);
-        return;
+        return 0;
     }
 
     /* non native condition variables */
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list