]> git.sesse.net Git - vlc/commitdiff
oldrc: fix thread-cancellation on windows (fixes #10483)
authorHannes Domani <ssbssa@yahoo.de>
Fri, 15 Aug 2014 20:50:48 +0000 (22:50 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 16 Aug 2014 07:27:10 +0000 (10:27 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/control/rc.c

index 0af8619572830b743c04199c29983d606461e99f..54a23c1f89bea3db13156dd32b3a8bf91a138b49 100644 (file)
@@ -1798,8 +1798,8 @@ static bool ReadWin32( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
     DWORD i_dw;
 
     /* On Win32, select() only works on socket descriptors */
-    while( WaitForSingleObject( p_intf->p_sys->hConsoleIn,
-                                INTF_IDLE_SLEEP/1000 ) == WAIT_OBJECT_0 )
+    while( WaitForSingleObjectEx( p_intf->p_sys->hConsoleIn,
+                                INTF_IDLE_SLEEP/1000, TRUE ) == WAIT_OBJECT_0 )
     {
         while( *pi_size < MAX_LINE_LENGTH &&
                ReadConsoleInput( p_intf->p_sys->hConsoleIn, &input_record,
@@ -1853,6 +1853,8 @@ static bool ReadWin32( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
         }
     }
 
+    vlc_testcancel ();
+
     return false;
 }
 #endif