]> git.sesse.net Git - vlc/commitdiff
Allocate message queues mutexes against NULL instead of an object.
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 31 Jan 2008 18:38:06 +0000 (18:38 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 31 Jan 2008 18:38:06 +0000 (18:38 +0000)
This avoids an infinite recursion if vlc_mutex_* fails (calls msg_Err).

src/misc/messages.c

index ea1b146138180b8b34d0142b05b37a31e0891568..5020a198aa539c3d44bba8423174db67dde9263b 100644 (file)
@@ -80,11 +80,12 @@ static void PrintMsg ( vlc_object_t *, msg_item_t * );
 void __msg_Create( vlc_object_t *p_this )
 {
     int i;
-    vlc_mutex_init( p_this, &(p_this->p_libvlc->msg_bank.lock) );
+    vlc_mutex_init( (vlc_object_t *)NULL,
+                    &(p_this->p_libvlc->msg_bank.lock) );
 
     for( i = 0; i < 2; i++ )
     {
-         vlc_mutex_init( p_this, &QUEUE(i).lock );
+         vlc_mutex_init( (vlc_object_t *)NULL, &QUEUE(i).lock );
          QUEUE(i).b_overflow = VLC_FALSE;
          QUEUE(i).i_id = i;
          QUEUE(i).i_start = 0;
@@ -306,6 +307,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
             return;
 #endif
         utf8_vfprintf( stderr, psz_format, _args );
+        fputc ('\n', stderr);
         return;
     }