]> git.sesse.net Git - vlc/commitdiff
vars command needs the variable lock
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 24 Sep 2009 17:00:15 +0000 (20:00 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 24 Sep 2009 17:18:43 +0000 (20:18 +0300)
src/misc/objects.c

index 8386bbaa2a0d6b2d35633f6e433dbb0abaffa148..eb8e799b5536068e0a3568b345d02c371a8544fc 100644 (file)
@@ -819,6 +819,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
 
         PrintObject( p_object, "" );
 
+        vlc_mutex_lock( &vlc_internals( p_object )->var_lock );
         if( !vlc_internals( p_object )->i_vars )
             printf( " `-o No variables\n" );
         for( i = 0; i < vlc_internals( p_object )->i_vars; i++ )
@@ -889,6 +890,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
             }
             printf( "\n" );
         }
+        vlc_mutex_unlock( &vlc_internals( p_object )->var_lock );
     }
     libvlc_unlock (p_this->p_libvlc);