]> git.sesse.net Git - x264/commitdiff
Make sigint handler variable volatile
authorFiona Glaser <fiona@x264.com>
Wed, 29 Sep 2010 07:15:14 +0000 (00:15 -0700)
committerFiona Glaser <fiona@x264.com>
Sun, 10 Oct 2010 21:43:40 +0000 (14:43 -0700)
Didn't actually cause any problems, but is necessary because it can be modified by another thread (the signal call).

x264.c

diff --git a/x264.c b/x264.c
index d55247c6d5c1bfe0525a6a0549d94eaabb34a266..cafba9022453f7ea3d3dbf62c8c579da8261b118 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -56,9 +56,9 @@
 #endif
 
 /* Ctrl-C handler */
-static int     b_ctrl_c = 0;
-static int     b_exit_on_ctrl_c = 0;
-static void    SigIntHandler( int a )
+static volatile int b_ctrl_c = 0;
+static int          b_exit_on_ctrl_c = 0;
+static void SigIntHandler( int a )
 {
     if( b_exit_on_ctrl_c )
         exit(0);