]> git.sesse.net Git - vlc/commitdiff
Cosmetics (msw).
authorLaurent Aimar <fenrir@videolan.org>
Tue, 8 Sep 2009 18:52:54 +0000 (20:52 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 14 Sep 2009 18:18:41 +0000 (20:18 +0200)
modules/video_output/msw/common.c
modules/video_output/msw/events.c

index 63cdc57b8949ab99cffd1114bb24a0299e51b6e6..3a83e727d105e56824c1fd18f6022ba90f7befa4 100644 (file)
@@ -84,6 +84,7 @@ int CommonInit( vout_thread_t *p_vout )
     p_sys->i_changes = 0;
     SetRectEmpty( &p_sys->rect_display );
     SetRectEmpty( &p_sys->rect_parent );
+    vlc_mutex_init( &p_sys->lock );
 
     p_sys->b_cursor_hidden = 0;
     p_sys->i_lastmoved = mdate();
@@ -116,6 +117,7 @@ int CommonInit( vout_thread_t *p_vout )
 void CommonClean( vout_thread_t *p_vout )
 {
     StopEventThread( p_vout );
+    vlc_mutex_destroy( &p_vout->p_sys->lock );
 
 #if !defined(UNDER_CE) && !defined(MODULE_NAME_IS_glwin32)
     RestoreScreensaver( p_vout );
index aa3c0e4dca29dd792a1d6b886ed14529a0eed287..9dfdab648b76fecb97b083d27313ec3c48cdb213 100644 (file)
@@ -880,9 +880,6 @@ static int DirectXConvertKey( int i_key )
 
 int CreateEventThread( vout_thread_t *p_vout )
 {
-    if( !( p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG ) )
-        vlc_mutex_init( &p_vout->p_sys->lock );
-
     /* Create the Vout EventThread, this thread is created by us to isolate
      * the Win32 PeekMessage function calls. We want to do this because
      * Windows can stay blocked inside this call for a long time, and when
@@ -947,8 +944,5 @@ void StopEventThread( vout_thread_t *p_vout )
         vlc_thread_join( p_event );
         vlc_object_release( p_event );
     }
-
-    if( !( p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG ) )
-        vlc_mutex_destroy( &p_vout->p_sys->lock );
 }