[vlc-devel] commit: Fix race condition : volume-change variable is requiered by rc interface module ( Rémi Duraffort )

git version control git at videolan.org
Fri Sep 18 19:42:26 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Sep 18 19:28:32 2009 +0200| [1aa499923cd6a9a79c3ef1519b6df41c96bb4b41] | committer: Rémi Duraffort 

Fix race condition : volume-change variable is requiered by rc interface module
and was created after the creation of the interface.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1aa499923cd6a9a79c3ef1519b6df41c96bb4b41
---

 src/libvlc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 4b078a8..6d3eb82 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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 );




More information about the vlc-devel mailing list