]> git.sesse.net Git - vlc/commitdiff
Fix race condition : volume-change variable is requiered by rc interface module
authorRémi Duraffort <ivoire@videolan.org>
Fri, 18 Sep 2009 17:28:32 +0000 (19:28 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 18 Sep 2009 17:29:10 +0000 (19:29 +0200)
and was created after the creation of the interface.

src/libvlc.c

index 4b078a85716c0a80586cd824d1c71a0d0f276d05..6d3eb82ad1c793db8e457b3deca5f3b7cca4469d 100644 (file)
@@ -858,6 +858,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /*
      * Load background interfaces
      */
+    /* Create volume callback system. (this variable must be created before
+       all interfaces as they can use it) */
+    var_Create( p_libvlc, "volume-change", VLC_VAR_BOOL );
+
     psz_modules = config_GetPsz( p_libvlc, "extraintf" );
     psz_control = config_GetPsz( p_libvlc, "control" );
 
@@ -981,8 +985,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     var_Create( p_libvlc, "drawable-clip-bottom", VLC_VAR_INTEGER );
     var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER );
 
-    /* Create volume callback system. */
-    var_Create( p_libvlc, "volume-change", VLC_VAR_BOOL );
 
     /* Create a variable for showing the fullscreen interface from hotkeys */
     var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );