]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
libvlccore: Don't set the priority on first thread on Mac OS X.
[vlc] / src / libvlc.c
index 22d1183918bb2f47ffebb467dc10ce5a8ad03af2..842aa7270b95c376e8dec51088184c9f8476348d 100644 (file)
@@ -306,12 +306,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
         return VLC_EGENERIC;
     }
 
-#ifdef __APPLE__
-    /* vlc_thread_set_priority needs to query the config,
-     * so this is the earliest moment where we can set this */
-    vlc_thread_set_priority( p_libvlc, VLC_THREAD_PRIORITY_LOW );
-#endif
-
     /* Check for short help option */
     if( config_GetInt( p_libvlc, "help" ) > 0 )
     {
@@ -1212,10 +1206,7 @@ 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, 19, "LC_ALL=%s", psz_lang );
-    psz_lcall[19] = '\0';
-    putenv( psz_lcall );
+    setenv( "LC_ALL", psz_lang, 1 );
 #endif
 
     setlocale( LC_ALL, psz_lang );
@@ -1232,8 +1223,8 @@ static inline int LoadMessages (void)
     static const char psz_path[] = LOCALEDIR;
 #else
     char psz_path[1024];
-    if (snprintf (psz_path, sizeof (psz_path), "%s/%s",
-                  vlc_global()->psz_vlcpath, "locale")
+    if (snprintf (psz_path, sizeof (psz_path), "%s" DIR_SEP "%s",
+                  config_GetDataDir(), "locale")
                      >= (int)sizeof (psz_path))
         return -1;