diff options
author | Carlo Bramini <carlo.bramix@libero.it> | 2008-03-14 20:13:48 +0000 |
---|---|---|
committer | Carlo Bramini <carlo.bramix@libero.it> | 2008-03-14 20:13:48 +0000 |
commit | b23f7d232b98527846bfcd41aed36914ffbc431b (patch) | |
tree | 34bb84ea932166f1a7929e99dd56ccdf03e4d0e9 /src | |
parent | fbd93b493f7c694e1c750b110ded431a65cb9664 (diff) | |
download | xine-lib-b23f7d232b98527846bfcd41aed36914ffbc431b.tar.gz xine-lib-b23f7d232b98527846bfcd41aed36914ffbc431b.tar.bz2 |
xine_init(): mutex objs not initialized
The problem comes from the fact that into xine_probe_fast_memcpy() there is
a call to xprintf, which excutes some actions to this->log_lock. But the
"log_lock" field is still uninitialized. Under Windows, the xine_init()
always crashes because that type is implemented as a structure, so the lock
receives a NULL pointer and the execution is halted. The attached patch
proposes to move the mutex objects to the top of xine_init() function.
--HG--
extra : transplant_source : %07%1D%7F%F0%97%7D%06%3E%9F%2Ar%03%1DQ%14%F3%D1%EF%1D%93
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/xine.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index efb845be5..d58b4ea55 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -1662,6 +1662,12 @@ void xine_init (xine_t *this) { static const char *demux_strategies[] = {"default", "reverse", "content", "extension", NULL}; + /* + * locks + */ + pthread_mutex_init (&this->streams_lock, NULL); + pthread_mutex_init (&this->log_lock, NULL); + /* initialize color conversion tables and functions */ init_yuv_conversion(); @@ -1743,12 +1749,6 @@ void xine_init (xine_t *this) { this->streams = xine_list_new(); /* - * locks - */ - pthread_mutex_init (&this->streams_lock, NULL); - pthread_mutex_init (&this->log_lock, NULL); - - /* * start metronom clock */ |