]> git.sesse.net Git - vlc/commitdiff
Win32 threads: Set priority on success rather than failure.
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 10 Feb 2008 16:49:59 +0000 (16:49 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 10 Feb 2008 16:49:59 +0000 (16:49 +0000)
Patch from atmo.

src/misc/threads.c

index 51801cd7ff0613703d3639363c4705c994581909..1c239a40bad62c7c9e5c3f5bde9ad37bc7751d4d 100644 (file)
@@ -591,12 +591,12 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
 #endif
         p_priv->thread_id.id = (DWORD)threadId;
         p_priv->thread_id.hThread = (HANDLE)hThread;
-    ResumeThread((HANDLE)hThread);
+        ResumeThread((HANDLE)hThread);
     }
 
     i_ret = ( p_priv->thread_id.hThread ? 0 : 1 );
 
-    if( i_ret && i_priority )
+    if( !i_ret && i_priority )
     {
         if( !SetThreadPriority(p_priv->thread_id.hThread, i_priority) )
         {