]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
Improved subtitiles/OSD quality when the rendering is done by the vout display module.
[vlc] / src / libvlc.c
index 53775ce877fdb7b7516a7d08a7f8748c7d79a025..06ebd6b8a7f4cf19f7688424ad93b771f3eb4d0f 100644 (file)
@@ -763,7 +763,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /*
      * Initialize hotkey handling
      */
-    vlc_InitActions( p_libvlc );
+    priv->actions = vlc_InitActions( p_libvlc );
 
     /* Create a variable for showing the fullscreen interface */
     var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );
@@ -799,7 +799,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
 #if defined(MEDIA_LIBRARY)
     /* Get the ML */
-    if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) == true )
+    if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) )
     {
         priv->p_ml = ml_Create( VLC_OBJECT( p_libvlc ), NULL );
         if( !priv->p_ml )
@@ -955,7 +955,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     var_Create( p_libvlc, "drawable-nsobject", VLC_VAR_ADDRESS );
 #endif
 #ifdef WIN32
-    var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_ADDRESS );
+    var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_INTEGER );
 #endif
 
     /*
@@ -1054,7 +1054,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     /* Free module bank. It is refcounted, so we call this each time  */
     module_EndBank( p_libvlc, true );
 
-    vlc_DeinitActions( p_libvlc );
+    vlc_DeinitActions( p_libvlc, priv->actions );
 }
 
 /**
@@ -1152,9 +1152,8 @@ static void SetLanguage ( const char *psz_lang )
      * the language at runtime under eg. Windows. Beware that this
      * makes the environment unconsistent when libvlc is unloaded and
      * should probably be moved to a safer place like vlc.c. */
-    static char psz_lcall[20];
-    snprintf( psz_lcall, sizeof(psz_lcall), "LC_ALL=%s", psz_lang );
-    putenv( psz_lcall );
+    setenv( "LC_ALL", psz_lang, 1 );
+
 #endif
 
     setlocale( LC_ALL, psz_lang );
@@ -1664,6 +1663,7 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search )
             i_cur_width = b_description && !b_description_hack
                           ? i_width_description
                           : i_width;
+            if( !*psz_text ) strcpy(psz_text, " ");
             while( *psz_text )
             {
                 char *psz_parser, *psz_word;