]> git.sesse.net Git - vlc/commitdiff
WinCE: fix cancellation safety
authorPierre Ynard <linkfanel@yahoo.fr>
Tue, 9 Dec 2008 10:37:39 +0000 (11:37 +0100)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 9 Dec 2008 16:30:55 +0000 (18:30 +0200)
Fix cancellation safety on WinCE. This very obnoxious bug prevents
proper thread cancellation, and effectively causes lock-ups when trying
to stop playback.

Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
src/misc/messages.c

index 8f448376e7119d47174a66a6d3c246f7808fb7ca..a1b953092ac4d21979816b3880d55007b151bb18 100644 (file)
@@ -556,7 +556,6 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
             return;
     }
 
-    int canc = vlc_savecancel ();
 #ifdef UNDER_CE
 #   define CE_WRITE(str) WriteFile( QUEUE.logfile, \
                                     str, strlen(str), &i_dummy, NULL );
@@ -570,6 +569,7 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
     FlushFileBuffers( QUEUE.logfile );
 
 #else
+    int canc = vlc_savecancel ();
     /* Send the message to stderr */
     utf8_fprintf( stderr, "[%s%p%s] %s%s%s %s%s: %s%s%s\n",
                   priv->b_color ? GREEN : "",