[vlc-devel] commit: Don't lock the message queue until we need it ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Nov 4 20:53:25 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Nov 4 21:51:32 2008 +0200| [352ed528dc5d531b154565fa5e16fbd7186f6db3] | committer: Rémi Denis-Courmont
Don't lock the message queue until we need it
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=352ed528dc5d531b154565fa5e16fbd7186f6db3
---
src/misc/messages.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/misc/messages.c b/src/misc/messages.c
index c26fcca..8f44837 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -468,9 +468,6 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
p_obj = p_obj->p_parent;
}
- msg_bank_t *p_queue = &QUEUE;
- vlc_mutex_lock( &p_queue->lock );
-
/* Fill message information fields */
p_item->i_type = i_type;
p_item->i_object_id = (uintptr_t)p_this;
@@ -480,6 +477,9 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
p_item->psz_header = psz_header;
PrintMsg( p_this, p_item );
+
+ msg_bank_t *p_queue = &QUEUE;
+ vlc_mutex_lock( &p_queue->lock );
#define bank p_queue
for (int i = 0; i < bank->i_sub; i++)
{
More information about the vlc-devel
mailing list