]> git.sesse.net Git - vlc/commitdiff
* clearer error messages on invalid seek
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 9 Oct 2005 21:34:51 +0000 (21:34 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Sun, 9 Oct 2005 21:34:51 +0000 (21:34 +0000)
* reenable the threads prio option. Not broken, but creates annoying error messages. will look into that later.

src/input/input.c
src/misc/threads.c

index a6a83966b130767c2e4a0c8b3aadf4273edc414c..135ca555610b88558b654f2c2854cb6ac9eee2c8 100644 (file)
@@ -1287,8 +1287,8 @@ static vlc_bool_t Control( input_thread_t *p_input, int i_type,
             }
             if( i_ret )
             {
-                msg_Err( p_input, "INPUT_CONTROL_SET_TIME(_OFFSET) "I64Fd
-                         " failed", i_time );
+                msg_Warn( p_input, "INPUT_CONTROL_SET_TIME(_OFFSET) "I64Fd
+                         " failed or not possible", i_time );
             }
             else
             {
index ca0fdac13b5fc28536a8110a5c97ff7468f46ca9..db3cceca01d84aba1d86fc91da78423b33675db6 100644 (file)
@@ -571,15 +571,18 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     i_ret = pthread_create( &p_this->thread_id, NULL, func, p_data );
 
-#ifndef SYS_DARWIN
-    if ( config_GetInt( p_this, "rt-priority" ) )
+#if !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
+    i_ret = config_GetInt( p_this, "rt-priority" );
 #endif
+    if( i_ret )
     {
         int i_error, i_policy;
         struct sched_param param;
 
         memset( &param, 0, sizeof(struct sched_param) );
+#if !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
         i_priority += config_GetInt( p_this, "rt-offset" );
+#endif
         if ( i_priority <= 0 )
         {
             param.sched_priority = (-1) * i_priority;
@@ -598,12 +601,10 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
             i_priority = 0;
         }
     }
-#ifndef SYS_DARWIN
     else
     {
         i_priority = 0;
     }
-#endif
 
 #elif defined( HAVE_CTHREADS_H )
     p_this->thread_id = cthread_fork( (cthread_fn_t)func, (any_t)p_data );
@@ -649,6 +650,8 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
 int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
                                int i_line, int i_priority )
 {
+    int i_ret;
+
 #if defined( PTH_INIT_IN_PTH_H ) || defined( ST_INIT_IN_ST_H )
 #elif defined( WIN32 ) || defined( UNDER_CE )
     if ( !SetThreadPriority(GetCurrentThread(), i_priority) )
@@ -658,8 +661,9 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
     }
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
-#ifndef SYS_DARWIN
-    if ( config_GetInt( p_this, "rt-priority" ) )
+#if !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
+    i_ret = config_GetInt( p_this, "rt-priority" );
+    if( i_ret )
 #endif
     {
         int i_error, i_policy;