]> git.sesse.net Git - vlc/commitdiff
libvlccore: Don't set the priority on first thread on Mac OS X.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 31 Jul 2008 20:57:50 +0000 (22:57 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 31 Jul 2008 20:57:50 +0000 (22:57 +0200)
Let's don't by pass the defaults here. This also fixes an thread error at exit.

src/libvlc.c
src/misc/threads.c

index 411ce92e9bf3ae8f68582aca880d705e50806c7d..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 )
     {
index 2405bdb3720ab654f2cbd9c8d31823c4dca07fbf..266584e17e4a8719e80909f492f0527c3265600d 100644 (file)
@@ -624,13 +624,8 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, const char * psz_file,
 
     if( !p_priv->b_thread )
     {
-#ifndef __APPLE__
         msg_Err( p_this, "couldn't set priority of non-existent thread" );
         return ESRCH;
-#else
-# warning FIXME: this is wrong
-        p_priv->b_thread = pthread_self();
-#endif
     }
 
 #if defined( LIBVLC_USE_PTHREAD )