Moved a lock creation to CreateEventThread.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 7 Sep 2009 20:40:10 +0000 (22:40 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 14 Sep 2009 18:18:41 +0000 (20:18 +0200)
It is more symetric with StopEventThread.

modules/video_output/msw/direct3d.c
modules/video_output/msw/directx.c
modules/video_output/msw/events.c
modules/video_output/msw/glwin32.c
modules/video_output/msw/wingdi.c

index 38c2976..6b5758d 100644 (file)
@@ -197,7 +197,6 @@ static int OpenVideo( vlc_object_t *p_this )
     p_vout->p_sys->hparent = p_vout->p_sys->hfswnd = NULL;
     p_vout->p_sys->i_changes = 0;
     p_vout->p_sys->b_desktop = false;
-    vlc_mutex_init( &p_vout->p_sys->lock );
     SetRectEmpty( &p_vout->p_sys->rect_display );
     SetRectEmpty( &p_vout->p_sys->rect_parent );
 
index f740852..5b3e6da 100644 (file)
@@ -234,7 +234,6 @@ static int OpenVideo( vlc_object_t *p_this )
     p_vout->p_sys->hparent = p_vout->p_sys->hfswnd = NULL;
     p_vout->p_sys->i_changes = 0;
     p_vout->p_sys->b_wallpaper = 0;
-    vlc_mutex_init( &p_vout->p_sys->lock );
     SetRectEmpty( &p_vout->p_sys->rect_display );
     SetRectEmpty( &p_vout->p_sys->rect_parent );
 
index cb7356c..bbf5931 100644 (file)
@@ -1334,6 +1334,9 @@ void RestoreScreensaver( vout_thread_t *p_vout )
 
 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
index 38a7b19..6f279d3 100644 (file)
@@ -106,7 +106,6 @@ static int OpenVideo( vlc_object_t *p_this )
     p_vout->p_sys->hwnd = p_vout->p_sys->hvideownd = NULL;
     p_vout->p_sys->hparent = p_vout->p_sys->hfswnd = NULL;
     p_vout->p_sys->i_changes = 0;
-    vlc_mutex_init( &p_vout->p_sys->lock );
     SetRectEmpty( &p_vout->p_sys->rect_display );
     SetRectEmpty( &p_vout->p_sys->rect_parent );
 
index 16214d0..e6ad270 100644 (file)
@@ -165,7 +165,6 @@ static int OpenVideo ( vlc_object_t *p_this )
     p_vout->p_sys->hwnd = p_vout->p_sys->hvideownd = NULL;
     p_vout->p_sys->hparent = p_vout->p_sys->hfswnd = NULL;
     p_vout->p_sys->i_changes = 0;
-    vlc_mutex_init( &p_vout->p_sys->lock );
     SetRectEmpty( &p_vout->p_sys->rect_display );
     SetRectEmpty( &p_vout->p_sys->rect_parent );