diff options
author | František Dvořák <valtri@civ.zcu.cz> | 2010-10-30 11:40:31 +0200 |
---|---|---|
committer | František Dvořák <valtri@civ.zcu.cz> | 2010-10-30 11:40:31 +0200 |
commit | 3a70a11d2871085ef8dcffdc81e3865c134de4d7 (patch) | |
tree | 5be9b6ea3a161ccf9063a3a3731031c6788d605e | |
parent | cd7f17a9e7eb91803782a87164717269aa336273 (diff) | |
download | xine-lib-3a70a11d2871085ef8dcffdc81e3865c134de4d7.tar.gz xine-lib-3a70a11d2871085ef8dcffdc81e3865c134de4d7.tar.bz2 |
Proper place for log mutex initialization (logging can start after xine_new()). Fixed a leak.
-rw-r--r-- | src/xine-engine/xine.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 842d864ba..ea90e45a4 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -1561,6 +1561,8 @@ void xine_exit (xine_t *this) { if(this->port_ticket) this->port_ticket->dispose(this->port_ticket); + pthread_mutex_destroy(&this->log_lock); + #if defined(WIN32) WSACleanup(); #endif @@ -1604,6 +1606,7 @@ xine_t *xine_new (void) { * log buffers */ memset(this->log_buffers, 0, sizeof(this->log_buffers)); + pthread_mutex_init (&this->log_lock, NULL); #ifdef WIN32 @@ -1696,7 +1699,6 @@ void xine_init (xine_t *this) { * locks */ pthread_mutex_init (&this->streams_lock, NULL); - pthread_mutex_init (&this->log_lock, NULL); /* initialize color conversion tables and functions */ init_yuv_conversion(); |