From 6131a63cad60f0e3c452ec9486e9c496b42bed82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Sun, 15 Apr 2007 22:25:20 +0200 Subject: Avoid locking log_lock once the buffer has been allocated. --- src/xine-engine/xine.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 840c91f3f..3109ac719 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -2034,6 +2034,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] ) -- cgit v1.2.3