[vlc-devel] commit: Cosmetics (msw). (Laurent Aimar )

git version control git at videolan.org
Mon Sep 14 20:20:03 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep  8 20:52:54 2009 +0200| [b9c3f900d46bf93aaa36b8ac6cd2329a98b43520] | committer: Laurent Aimar 

Cosmetics (msw).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9c3f900d46bf93aaa36b8ac6cd2329a98b43520
---

 modules/video_output/msw/common.c |    2 ++
 modules/video_output/msw/events.c |    6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index 63cdc57..3a83e72 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -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 );
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index aa3c0e4..9dfdab6 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -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 );
 }
 




More information about the vlc-devel mailing list