]> git.sesse.net Git - vlc/commitdiff
Plugins: push cancellation down
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 10 Aug 2008 16:49:48 +0000 (19:49 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 27 Aug 2008 19:43:08 +0000 (22:43 +0300)
35 files changed:
modules/access/dv.c
modules/access/dvdnav.c
modules/access/mms/mmstu.c
modules/access/rtmp/access.c
modules/access_filter/timeshift.c
modules/access_output/bonjour.c
modules/access_output/rtmp.c
modules/access_output/udp.c
modules/audio_output/alsa.c
modules/audio_output/directx.c
modules/audio_output/hd1000a.cpp
modules/audio_output/oss.c
modules/audio_output/portaudio.c
modules/audio_output/waveout.c
modules/codec/avcodec/encoder.c
modules/demux/live555.cpp
modules/demux/mkv.cpp
modules/gui/qnx/aout.c
modules/gui/qt4/qt4.cpp
modules/gui/wince/wince.cpp
modules/gui/wxwidgets/wxwidgets.cpp
modules/misc/freetype.c
modules/misc/gtk_main.c
modules/misc/qte_main.cpp
modules/misc/rtsp.c
modules/misc/testsuite/test4.c
modules/stream_out/rtp.c
modules/stream_out/transcode.c
modules/video_filter/atmo/AtmoThread.cpp
modules/video_filter/atmo/atmo.cpp
modules/video_filter/remoteosd.c
modules/video_output/msw/events.c
modules/video_output/qte/qte.cpp
modules/visualization/galaktos/plugin.c
modules/visualization/goom.c

index 570ec5ed76a223eb818d7d5b96aee3d1ad8a50ab..80330863c86301e72ca84ebd021c598bc86ee069 100644 (file)
@@ -363,6 +363,7 @@ static void* Raw1394EventThread( vlc_object_t *p_this )
     access_t *p_access = (access_t *) p_ev->p_access;
     access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
     int result = 0;
+    int canc = vlc_savecancel ();
 
     AVCPlay( p_access, p_sys->i_node );
 
@@ -386,6 +387,7 @@ static void* Raw1394EventThread( vlc_object_t *p_this )
     }
 
     AVCStop( p_access, p_sys->i_node );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 2ccc90311e573de7dfed4b07b7f2ada6fbb728bf..6ab93b7a888b36a1a9e94db9759ed3ef53b490a0 100644 (file)
@@ -1263,6 +1263,8 @@ static void* EventThread( vlc_object_t *p_this )
     p_ev->i_key_action = 0;
     p_ev->b_still   = false;
 
+    int canc = vlc_savecancel ();
+
     /* catch all key event */
     var_AddCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
 
@@ -1373,7 +1375,7 @@ static void* EventThread( vlc_object_t *p_this )
         vlc_object_release( p_vout );
     }
     var_DelCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
-
+    vlc_restorecancel (canc);
     vlc_mutex_destroy( &p_ev->lock );
 
     return NULL;
index 72eac8417526bec7ea980b0c59bcbf239f5e7b1c..597dcbd5631cfcc7ba1fdc19903ba7c2f650cbc2 100644 (file)
@@ -1609,6 +1609,7 @@ static void* KeepAliveThread( vlc_object_t *p_this )
     vlc_object_lock( p_thread );
     while( vlc_object_alive( p_thread) )
     {
+        int canc = vlc_savecancel ();
         b_paused = p_thread->b_paused;
 
         if( b_paused && b_was_paused )
@@ -1616,6 +1617,7 @@ static void* KeepAliveThread( vlc_object_t *p_this )
 
         b_was_paused = b_paused;
         vlc_object_timedwait( p_thread, mdate() + 10000000 );
+        vlc_restorecancel (canc);
     }
     vlc_object_unlock( p_thread );
     return NULL;
index c0bf34706f7bb6802dbdc5feb4fbc7e16a29dae2..bee0c1b25e6768b00dc1feaf517d72af90dc3ece 100644 (file)
@@ -507,6 +507,7 @@ static void* ThreadControl( vlc_object_t *p_this )
 {
     rtmp_control_thread_t *p_thread = (rtmp_control_thread_t *) p_this;
     rtmp_packet_t *rtmp_packet;
+    int canc = vlc_savecancel ();
 
     rtmp_init_handler( p_thread->rtmp_handler );
 
@@ -543,5 +544,6 @@ static void* ThreadControl( vlc_object_t *p_this )
             block_FifoWake( p_thread->p_fifo_input );
         }
     }
+    vlc_restorecancel (canc);
     return NULL;
 }
index 6567e22c57cde4579c3030dd69f4dc7999c3a22d..02fae43a094cb0108f5f5db62c536ee44202b394 100644 (file)
@@ -279,6 +279,7 @@ static void* Thread( vlc_object_t* p_this )
     access_t     *p_src = p_access->p_source;
     block_t      *p_block;
 
+    int canc = vlc_savecancel ();
     while( vlc_object_alive (p_access) )
     {
         /* Get a new block from the source */
@@ -357,6 +358,7 @@ static void* Thread( vlc_object_t* p_this )
 
     /* Send dummy packet to avoid deadlock in Block() */
     block_FifoPut( p_sys->p_fifo, block_New( p_access, 0 ) );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 9d37308c0bff8f75483932fabb0ae60bbbda4caa..507ddf44687cb81eca4078e614556278f1a18f39 100644 (file)
@@ -186,11 +186,13 @@ static void* poll_iterate_thread( vlc_object_t *p_this )
 {
     poll_thread_t *p_pt = (poll_thread_t*)p_this;
     vlc_thread_ready( p_pt );
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (p_pt) )
         if( avahi_simple_poll_iterate( p_pt->simple_poll, 100 ) != 0 )
             break;
 
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index ebf7175ab6cf486e37fd3ab4014cde306387b35d..b6a2047529e3483b3721d4f243fe66bca959de2d 100644 (file)
@@ -383,6 +383,7 @@ static void* ThreadControl( vlc_object_t *p_this )
 {
     rtmp_control_thread_t *p_thread = (rtmp_control_thread_t *) p_this;
     rtmp_packet_t *rtmp_packet;
+    int canc = vlc_savecancel ();
 
     rtmp_init_handler( p_thread->rtmp_handler );
 
@@ -416,5 +417,6 @@ static void* ThreadControl( vlc_object_t *p_this )
             p_thread->b_die = 1;
         }
     }
+    vlc_restorecancel (canc);
     return NULL;
 }
index 2cadddf90bbf178a0362174671d64083553164cd..e439bf9e458b6f17eaec74d5c41609ce5306e393 100644 (file)
@@ -443,6 +443,7 @@ static void* ThreadWrite( vlc_object_t *p_this )
     mtime_t              i_date_last = -1;
     mtime_t              i_to_send = p_thread->i_group;
     int                  i_dropped_packets = 0;
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (p_thread) )
     {
@@ -519,5 +520,6 @@ static void* ThreadWrite( vlc_object_t *p_this )
 
         i_date_last = i_date;
     }
+    vlc_restorecancel (canc);
     return NULL;
 }
index 6c020d86dd59aa3953308c98275bcb98c6277760..680f6e7ac8cbf4b7ba96d136f52489292f37ab76 100644 (file)
@@ -764,6 +764,7 @@ static void* ALSAThread( vlc_object_t* p_this )
 {
     aout_instance_t * p_aout = (aout_instance_t*)p_this;
     struct aout_sys_t * p_sys = p_aout->output.p_sys;
+    int canc = vlc_savecancel ();
     p_sys->p_status = (snd_pcm_status_t *)malloc(snd_pcm_status_sizeof());
 
     /* Wait for the exact time to start playing (avoids resampling) */
@@ -785,6 +786,7 @@ static void* ALSAThread( vlc_object_t* p_this )
 cleanup:
     snd_pcm_drop( p_sys->p_snd_pcm );
     free( p_aout->output.p_sys->p_status );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 0b9737ddee227eb9015afc2e69246e11be679fe8..00068bd657747f11a9b66d1d4e01fdd24759ae5b 100644 (file)
@@ -1054,6 +1054,7 @@ static void* DirectSoundThread( vlc_object_t *p_this )
     mtime_t last_time;
     HRESULT dsresult;
     long l_queued = 0;
+    int canc = vlc_savecancel ();
 
     /* We don't want any resampling when using S/PDIF output */
     b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
@@ -1148,6 +1149,7 @@ static void* DirectSoundThread( vlc_object_t *p_this )
     /* free the event */
     CloseHandle( p_notif->event );
 
+    vlc_restorecancel (canc);
     msg_Dbg( p_notif, "DirectSoundThread exiting" );
     return NULL;
 }
index 3604c6ea017394289044a28e04e5e52ae7062d67..cb01386c222498ed5c45048b17c37e3ea75eabda 100644 (file)
@@ -222,6 +222,7 @@ static void* Thread( vlc_object_t *p_this )
     aout_buffer_t * p_buffer;
     struct aout_sys_t * p_sys = p_aout->output.p_sys;
     PCMAudioPlayer * pPlayer = p_sys->pPlayer;
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (p_aout) )
     {
@@ -254,6 +255,7 @@ static void* Thread( vlc_object_t *p_this )
 #undef i
     }
 
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 0f1377ea7b4c6a28428a74ba9024a0a633d98e8f..118cdc415bf1d488d2644aeac51d922d54d0efd1 100644 (file)
@@ -590,6 +590,7 @@ static void* OSSThread( vlc_object_t *p_this )
     aout_instance_t * p_aout = (aout_instance_t*)p_this;
     struct aout_sys_t * p_sys = p_aout->output.p_sys;
     mtime_t next_date = 0;
+    int canc = vlc_savecancel ();
 
     while ( vlc_object_alive (p_aout) )
     {
@@ -690,5 +691,6 @@ static void* OSSThread( vlc_object_t *p_this )
         }
     }
 
+    vlc_restorecancel (canc);
     return NULL;
 }
index 3a8764063d76ff4a2d99377b69fa764dc0fd998d..1a95c3e53bb2928b643abb56a1be12cc5712e99f 100644 (file)
@@ -573,6 +573,7 @@ static void* PORTAUDIOThread( vlc_object_t *p_this )
     aout_instance_t *p_aout;
     aout_sys_t *p_sys;
     int i_err;
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (pa_thread) )
     {
@@ -645,6 +646,7 @@ static void* PORTAUDIOThread( vlc_object_t *p_this )
         vlc_cond_signal( &pa_thread->wait );
         vlc_mutex_unlock( &pa_thread->lock_wait );
     }
+    vlc_restorecancel (canc);
     return NULL;
 }
 #endif
index 7b48bf451aa4aeffa2f7eb7212bb677c6c5ba9ac..29610f2a03dcc18764f337bf22ec88ca6550b104 100644 (file)
@@ -982,6 +982,7 @@ static void* WaveOutThread( vlc_object_t *p_this )
     bool b_sleek;
     mtime_t next_date;
     uint32_t i_buffer_length = 64;
+    int canc = vlc_savecancel ();
 
     /* We don't want any resampling when using S/PDIF */
     b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
@@ -1108,6 +1109,7 @@ static void* WaveOutThread( vlc_object_t *p_this )
     }
 
 #undef waveout_warn
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 544557978c1033bd003746fefe8a5fdef0d986f5..98089fbe13f1f1098742930ec3b08b5a35cd0bbc 100644 (file)
@@ -706,6 +706,7 @@ int OpenEncoder( vlc_object_t *p_this )
 static void* FfmpegThread( vlc_object_t *p_this )
 {
     struct thread_context_t *p_context = (struct thread_context_t *)p_this;
+    int canc = vlc_savecancel ();
     while ( vlc_object_alive (p_context) && !p_context->b_error )
     {
         vlc_mutex_lock( &p_context->lock );
@@ -730,6 +731,7 @@ static void* FfmpegThread( vlc_object_t *p_this )
         vlc_mutex_unlock( &p_context->lock );
     }
 
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 89d12401a190d0673b1709490bccd2c7b6ef30f6..eb7a89a6cec4a302e4671a4753c90a2c0aec6b64 100644 (file)
@@ -1737,6 +1737,7 @@ static void* TimeoutPrevention( vlc_object_t * p_this )
 
     vlc_thread_ready( p_timeout );
 
+    int canc = vlc_savecancel ();
     /* Avoid lock */
     while( vlc_object_alive (p_timeout) )
     {
@@ -1759,6 +1760,7 @@ static void* TimeoutPrevention( vlc_object_t * p_this )
         p_timeout->i_remain -= 200000;
         msleep( 200000 ); /* 200 ms */
     }
+    vlc_restorecancel (canc);
 }
 
 /*****************************************************************************
index 994648dc53dd8f5d578ec7272908ea799eb706cf..7fe77bfe67ba9022a07ba2a8f82f3063c560662b 100644 (file)
@@ -2770,6 +2770,7 @@ void * demux_sys_t::EventThread( vlc_object_t *p_this )
     event_thread_t *p_ev = (event_thread_t*)p_this;
     demux_sys_t    *p_sys = p_ev->p_demux->p_sys;
     vlc_object_t   *p_vout = NULL;
+    int canc = vlc_savecancel ();
 
     p_ev->b_moved   = false;
     p_ev->b_clicked = false;
@@ -3071,6 +3072,7 @@ void * demux_sys_t::EventThread( vlc_object_t *p_this )
 
     vlc_mutex_destroy( &p_ev->lock );
 
+    vlc_restorecancel (canc);
     return VLC_SUCCESS;
 }
 
index 8f8b5121d0cd710a2d5e5c1a4ce520d393562353..77736af6184a922000abdf66d4d3147c5a7fe5cf 100644 (file)
@@ -265,6 +265,7 @@ static void* QNXaoutThread( vlc_object_t *p_this )
 {
     aout_instance_t * p_aout = (aout_instance_t*)p_this;
     struct aout_sys_t * p_sys = p_aout->output.p_sys;
+    int canc = vlc_savecancel ();
 
     while ( vlc_object_alive (p_aout) )
     {
@@ -321,6 +322,7 @@ static void* QNXaoutThread( vlc_object_t *p_this )
         }
     }
 
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 0811f14ecd0ca93b2b32857b338489660436bf90..eb0c937cfad22ac9ed32e61cfab275061175b7e7 100644 (file)
@@ -311,6 +311,7 @@ static void *Init( vlc_object_t *obj )
     char dummy[] = "";
     char *argv[] = { dummy };
     int argc = 1;
+    int canc = vlc_savecancel ();
 
     Q_INIT_RESOURCE( vlc );
 
@@ -464,6 +465,8 @@ static void *Init( vlc_object_t *obj )
     /* Save the path */
     config_PutPsz( p_intf, "qt-filedialog-path", p_intf->p_sys->psz_filepath );
     free( psz_path );
+    vlc_restorecancel (canc);
+    return NULL;
 }
 
 /*****************************************************************************
index 91e3b6c24f0fa3f22734cdc03a70ee5fb16ee58a..beee18fefc84f88668637b45f2c8596671c1216c 100644 (file)
@@ -213,6 +213,7 @@ static void* MainLoop( vlc_object_t * p_this )
     intf_thread_t *p_intf = (intf_thread_t*)p_this;
     MSG msg;
     Interface *intf = 0;
+    int canc = vlc_savecancel ();
 
     if( !hInstance ) hInstance = GetModuleHandle(NULL);
 
@@ -268,6 +269,7 @@ static void* MainLoop( vlc_object_t * p_this )
     /* Uninitialize OLE/COM */
     CoUninitialize();
 #endif
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 8da4253f2de24c7ca252cf0a80dc45c0e988cdaa..d45bee707fd084aa2b4c4caba49a49085bba570e 100644 (file)
@@ -299,6 +299,7 @@ static void* Init( vlc_object_t * p_this )
     static char  *p_args[] = { "" };
     int i_args = 1;
 #endif
+    int canc = vlc_savecancel ();
 
     /* Hack to pass the p_intf pointer to the new wxWidgets Instance object */
 #ifdef wxTheApp
@@ -321,6 +322,7 @@ static void* Init( vlc_object_t * p_this )
 #else
     wxEntry( i_args, p_args );
 #endif
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index d7c93f58a12b845e948f77a97958e92bc474df6d..774ae1633729ad13a2ddf1c3ab7a474f5a790a47 100644 (file)
@@ -525,6 +525,7 @@ static void* FontBuilderThread( vlc_object_t *p_this )
     if( p_fontconfig )
     {
         mtime_t    t1, t2;
+        int canc = vlc_savecancel ();
 
         //msg_Dbg( p_this, "Building font database..." );
         msg_Dbg( p_this, "Building font database..." );
@@ -548,6 +549,7 @@ static void* FontBuilderThread( vlc_object_t *p_this )
         vlc_mutex_unlock( p_lock );
 
         var_SetBool( p_this, "build-done", true );
+        vlc_restorecancel (canc);
     }
     return NULL;
 }
index 7834352beb8c5bfe894722e9c7db39421e1a1df7..68a9c2848d36190d1d3f05a84cb5c4f27e69f369 100644 (file)
@@ -167,6 +167,7 @@ static void* GtkMain( vlc_object_t *p_this )
     static char **pp_args  = p_args;
 #endif
     static int    i_args   = 1;
+    int canc = vlc_savecancel ();
 
     /* FIXME: deprecated ? */
 #if defined(MODULE_NAME_IS_gtk2_main) || defined(MODULE_NAME_IS_gnome2_main)
@@ -197,5 +198,6 @@ static void* GtkMain( vlc_object_t *p_this )
     gtk_main();
 
     gdk_threads_leave();
+    vlc_restorecancel (canc);
     return NULL;
 }
index 696290ae47a93553410d1c8c2564a949aa62ebcf..f97082252a00777c8b5bdd634a81bd514da454c8 100644 (file)
@@ -162,6 +162,7 @@ static void* QteMain( vlc_object_t* p_vlc_obj )
 {
     qte_thread_t *p_this = (qte_thread_t*)p_vlc_obj;
     int i_argc = 1;
+    int canc = vlc_savecancel ();
 
     p_this->b_gui_server = false;
     if( config_GetInt( p_this, "qte-guiserver" ) )
@@ -191,5 +192,6 @@ static void* QteMain( vlc_object_t* p_vlc_obj )
     vlc_thread_ready( p_this );
     p_this->p_qte_application->exec();
 
+    vlc_restorecancel (canc);
     return NULL;
 }
index 561e110cae0a647b6a087abcd47642e3bfef78f6..d487f2385dbb544cf70769fad99db9e5830e0c14 100644 (file)
@@ -816,6 +816,7 @@ static void* CommandThread( vlc_object_t *p_this )
 {
     vod_t *p_vod = (vod_t*)p_this;
     vod_sys_t *p_sys = p_vod->p_sys;
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (p_vod) )
     {
@@ -883,6 +884,8 @@ static void* CommandThread( vlc_object_t *p_this )
         free( cmd.psz_session );
         free( cmd.psz_arg );
     }
+
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 170992ee72ce20537844ba0301ee5762156a7c54..091de4618b8731b3a955c268438eb97557822f4b 100644 (file)
@@ -242,10 +242,13 @@ static void * MyThread( vlc_object_t *p_this )
     while( vlc_object_alive (p_this) )
     {
         int i = (int) (100.0 * rand() / (RAND_MAX));
+        /* FIXME: not thread-safe */
 
         sprintf( psz_var, "blork-%i", i );
         val.i_int = i + 200;
+        int canc = vlc_savecancel ();
         var_Set( p_parent, psz_var, val );
+        vlc_restorecancel (canc);
 
         /* This is quite heavy, but we only have 10 threads. Keep cool. */
         msleep( 1000 );
index c7facb5a8adfe42d0f20c166045716adb6d533e1..3d11cea6864eb2f9e3b80c6c3af0c9f1945448ab 100644 (file)
@@ -1434,6 +1434,7 @@ static void* ThreadSend( vlc_object_t *p_this )
 {
     sout_stream_id_t *id = (sout_stream_id_t *)p_this;
     unsigned i_caching = id->i_caching;
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (id) )
     {
@@ -1499,6 +1500,7 @@ static void* ThreadSend( vlc_object_t *p_this )
             rtp_add_sink( id, fd, true );
         }
     }
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 1c417c80d197cac3ee08f10a7d60ef49ece6b6f1..55684bf65d5f52b6fe9fae4a98cfb1fc565f672c 100644 (file)
@@ -2102,6 +2102,7 @@ static void* EncoderThread( vlc_object_t* p_this )
     sout_stream_sys_t *p_sys = (sout_stream_sys_t*)p_this;
     sout_stream_id_t *id = p_sys->id_video;
     picture_t *p_pic;
+    int canc = vlc_savecancel ();
 
     while( vlc_object_alive (p_sys) && !p_sys->b_error )
     {
@@ -2142,6 +2143,7 @@ static void* EncoderThread( vlc_object_t* p_this )
     }
     block_ChainRelease( p_sys->p_buffers );
 
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index cdf22a5dd512620b0dd683cbca1846b1c8a70f55..f4f618e0301b7fdcb2a0b5de7e72176170db9592 100644 (file)
@@ -72,11 +72,14 @@ void *CThread::ThreadProc(vlc_object_t *obj)
       atmo_thread_t *pAtmoThread = (atmo_thread_t *)obj;
       CThread *pThread = (CThread *)pAtmoThread->p_thread;
       if(pThread) {
+         int canc;
+
          // give feedback I'am running?
          vlc_thread_ready( pThread->m_pAtmoThread );
 
-            pThread->Execute();
-
+         canc = vlc_savecancel ();
+         pThread->Execute();
+         vlc_restorecancel (canc);
       }
       return NULL;
 }
index 7c7e980bd5ccae5f64f08f3f5b54aac925b302e1..7ac2a3ad206cd65336e053c41d60504be6d2c61c 100644 (file)
@@ -1741,6 +1741,7 @@ static void *FadeToColorThread(vlc_object_t *obj)
 
     uint8_t *p_source = NULL;
 
+    int canc = vlc_savecancel ();
     /* initialize AtmoWin for this thread! */
     AtmoInitialize(p_fadethread->p_filter , true);
 
@@ -1825,6 +1826,7 @@ static void *FadeToColorThread(vlc_object_t *obj)
     }
     /* call indirect to OleUnitialize() for this thread */
     AtmoFinalize(p_fadethread->p_filter, 0);
+    vlc_restorecancel (canc);
 }
 
 /*****************************************************************************
index 6e4a5be941cf63a4d66185cf2636fe165bfa5575..9fc04bef57d231e5084b7f342f57bd6f719c2f8a 100644 (file)
@@ -677,6 +677,7 @@ static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
     filter_t* p_filter = (filter_t*)(p_thread_obj->p_parent);
     filter_sys_t *p_sys = p_filter->p_sys;
     vlc_object_t *p_update_request_thread;
+    int canc = vlc_savecancel ();
 
     msg_Dbg( p_filter, "VNC worker thread started" );
 
@@ -799,6 +800,7 @@ exit:
     vlc_mutex_unlock( &p_sys->lock );
 
     msg_Dbg( p_filter, "VNC message reader thread ended" );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
@@ -806,6 +808,7 @@ static void* update_request_thread( vlc_object_t *p_thread_obj )
 {
     filter_t* p_filter = (filter_t*)(p_thread_obj->p_parent);
     filter_sys_t *p_sys = p_filter->p_sys;
+    int canc = vlc_savecancel ();
 
     msg_Dbg( p_filter, "VNC update request thread started" );
 
@@ -848,6 +851,7 @@ static void* update_request_thread( vlc_object_t *p_thread_obj )
     }
 
     msg_Dbg( p_filter, "VNC update request thread ended" );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 4edb568c4921a0a9f7de83d98d64105455fa1006..28c4a9c2d5bc45f1b469387fc45c6fd2c413d033 100644 (file)
@@ -100,6 +100,7 @@ void* EventThread( vlc_object_t *p_this )
     vlc_value_t val;
     unsigned int i_width, i_height, i_x, i_y;
     HMODULE hkernel32;
+    int canc = vlc_savecancel ();
 
     /* Initialisation */
     p_event->p_vout->pf_control = Control;
@@ -376,6 +377,7 @@ void* EventThread( vlc_object_t *p_this )
     p_event->p_vout->p_sys->i_changes = 0;
 
     DirectXCloseWindow( p_event->p_vout );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 2968e073d9ccc7330e6c369e93c87397de8aa87f..a8e9c0788dad70cb796781db875f14a134edb9e8 100644 (file)
@@ -591,6 +591,7 @@ static void CloseDisplay( vout_thread_t *p_vout )
 static void* RunQtThread( vlc_object_t *p_this )
 {
     event_thread_t *p_event = (event_thread_t *)p_this;
+    int canc = vlc_savecancel ();
     msg_Dbg( p_event->p_vout, "RunQtThread starting" );
 
 #ifdef NEED_QTE_MAIN
@@ -669,6 +670,7 @@ static void* RunQtThread( vlc_object_t *p_this )
 #endif
 
     msg_Dbg( p_event->p_vout, "RunQtThread terminating" );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 729390c7a046f012ce6b1f06c1c8040c7db44551..27638be18105cc6636980756cd434a1991480321 100644 (file)
@@ -197,12 +197,16 @@ static void* Thread( vlc_object_t *p_this )
     int timed=0;
     int timestart=0;
     int mspf=0;
+    int canc = vlc_savecancel ();
 
     /* Get on OpenGL provider */
     p_thread->p_opengl =
         (vout_thread_t *)vlc_object_create( p_this, VLC_OBJECT_OPENGL );
     if( p_thread->p_opengl == NULL )
+    {
+        vlc_restorecancel (canc);
         return NULL;
+    }
     vlc_object_attach( p_thread->p_opengl, p_this );
 
     /* Initialize vout parameters */
@@ -228,6 +232,7 @@ static void* Thread( vlc_object_t *p_this )
         msg_Err( p_thread, "unable to initialize OpenGL" );
         vlc_object_detach( p_thread->p_opengl );
         vlc_object_release( p_thread->p_opengl );
+        vlc_restorecancel (canc);
         return NULL;
     }
 
@@ -267,6 +272,7 @@ static void* Thread( vlc_object_t *p_this )
     module_Unneed( p_thread->p_opengl, p_thread->p_module );
     vlc_object_detach( p_thread->p_opengl );
     vlc_object_release( p_thread->p_opengl );
+    vlc_restorecancel (canc);
     return NULL;
 }
 
index 6827a2c995134bb9d41e55e5f52fe2da1feaa044..8dc2f03e0d24cbc9ba744cd56121caf82bf6e530 100644 (file)
@@ -325,6 +325,7 @@ static void* Thread( vlc_object_t *p_this )
     int16_t p_data[2][512];
     int i_data = 0, i_count = 0;
     PluginInfo *p_plugin_info;
+    int canc = vlc_savecancel ();
 
     var_Get( p_this, "goom-width", &width );
     var_Get( p_this, "goom-height", &height );
@@ -375,6 +376,7 @@ static void* Thread( vlc_object_t *p_this )
     }
 
     goom_close( p_plugin_info );
+    vlc_restorecancel (canc);
     return NULL;
 }