diff options
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r-- | src/xine-engine/xine.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 82d6d758f..ce2af52fa 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -47,6 +47,8 @@ #include <locale.h> #endif +#include <basedir.h> + #define LOG_MODULE "xine" #define LOG_VERBOSE /* @@ -1475,6 +1477,8 @@ void xine_exit (xine_t *this) { WSACleanup(); #endif + xdgFreeHandle(this->basedir_handle); + free (this); } @@ -1600,8 +1604,11 @@ static void config_save_cb (void *this_gen, xine_cfg_entry_t *entry) { } void xine_init (xine_t *this) { - static const char *demux_strategies[] = {"default", "reverse", "content", - "extension", NULL}; + static const char *const demux_strategies[] = {"default", "reverse", "content", + "extension", NULL}; + + /* First of all, initialise libxdg-basedir as it's used by plugins. */ + this->basedir_handle = xdgAllocHandle(); /* initialize color conversion tables and functions */ init_yuv_conversion(); @@ -2034,6 +2041,9 @@ const char *const *xine_get_log_names (xine_t *this) { static inline void check_log_alloc (xine_t *this, int buf) { + if ( this->log_buffers[buf] ) + return; + pthread_mutex_lock (&this->log_lock); if ( ! this->log_buffers[buf] ) |