]> git.sesse.net Git - vlc/commitdiff
Remove p_root->b_ready. Duplicated state.
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 4 May 2008 16:34:34 +0000 (19:34 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 4 May 2008 16:34:34 +0000 (19:34 +0300)
src/libvlc-common.c
src/libvlc.h
src/misc/threads.c

index 4820619a4e61ee42a0f5949e5c81cb0c5e96723a..2cd9d67aab4450af124d3044f8115fb53ca1d79e 100644 (file)
@@ -158,14 +158,12 @@ libvlc_int_t * libvlc_InternalCreate( void )
     /* Now that the thread system is initialized, we don't have much, but
      * at least we have variables */
     vlc_mutex_t *lock = var_AcquireMutex( "libvlc" );
-    if( !p_libvlc_global->b_ready )
+    if( i_instances == 0 )
     {
         /* Guess what CPU we have */
         cpu_flags = CPUCapabilities();
        /* The module bank will be initialized later */
         p_libvlc_global->p_module_bank = NULL;
-
-        p_libvlc_global->b_ready = true;
     }
 
     /* Allocate a libvlc instance object */
index 3b25abb5727ebcd63fa139fae440fe4e723be65b..9b793a7adb6f307c7c0d41df86b2038293109c58 100644 (file)
@@ -109,8 +109,6 @@ struct libvlc_global_data_t
 {
     VLC_COMMON_MEMBERS
 
-    bool             b_ready;     ///< Initialization boolean
-
    /* Object structure data */
     int                    i_counter;   ///< object counter
     int                    i_objects;   ///< Attached objects count
index 8b0b3b9e5629a584f6a42f9760fb2cca2b1d3504..5abe9744327d7fb8015044b4077bea1fec4e7bd4 100644 (file)
@@ -151,7 +151,6 @@ int vlc_threads_init( void )
         }
 
         /* We should be safe now. Do all the initialization stuff we want. */
-        p_root->b_ready = false;
         vlc_threadvar_create( p_root, &msg_context_global_key );
     }
     i_initializations++;