summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2014-04-21 11:14:22 +0200
committerNicolas George <george@nsup.org>2014-05-26 11:33:42 +0200
commit58a10e0e2ce185874e69d54294d192e4e4662a50 (patch)
tree3a5a17dd28ef7ae8c79b88b24247af4f6520ef4e /compat
parent96470ca22b3b46677de0e2df64e87c5ec80d752b (diff)
downloadffmpeg-streaming-58a10e0e2ce185874e69d54294d192e4e4662a50.zip
ffmpeg-streaming-58a10e0e2ce185874e69d54294d192e4e4662a50.tar.gz
compat/w32pthreads: add return value to pthread_cond_init().
Diffstat (limited to 'compat')
-rw-r--r--compat/w32pthreads.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index 7b51c25..cfb8f64 100644
--- a/compat/w32pthreads.h
+++ b/compat/w32pthreads.h
@@ -134,28 +134,29 @@ typedef struct win32_cond_t {
volatile int is_broadcast;
} win32_cond_t;
-static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr)
+static int pthread_cond_init(pthread_cond_t *cond, const void *unused_attr)
{
win32_cond_t *win32_cond = NULL;
if (cond_init) {
cond_init(cond);
- return;
+ return 0;
}
/* non native condition variables */
win32_cond = av_mallocz(sizeof(win32_cond_t));
if (!win32_cond)
- return;
+ return ENOMEM;
cond->ptr = win32_cond;
win32_cond->semaphore = CreateSemaphore(NULL, 0, 0x7fffffff, NULL);
if (!win32_cond->semaphore)
- return;
+ return ENOMEM;
win32_cond->waiters_done = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!win32_cond->waiters_done)
- return;
+ return ENOMEM;
pthread_mutex_init(&win32_cond->mtx_waiter_count, NULL);
pthread_mutex_init(&win32_cond->mtx_broadcast, NULL);
+ return 0;
}
static void pthread_cond_destroy(pthread_cond_t *cond)
OpenPOWER on IntegriCloud