]> git.sesse.net Git - vlc/commitdiff
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 38c2976a6b79d4863ae9ed9ff5cb6c3498e202e2..6b5758de966e1cad13d3d5548c5f76af5b6cd77d 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 f740852d1f9c9981294b4d59e45c90b5bcc1bd1d..5b3e6da6b93653234a3f53709d10937e254d4d9a 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 cb7356cd4fe0c2c56d50a1cadc5c8ac355f4d189..bbf5931bf3f9b460b9b03dc24c83031cbea6106f 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 38a7b19b20374c2ef77902f4be8b753083aea527..6f279d3932554b8b83c636fd7e42f0b95cb41e15 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 16214d069c84bbd30ec5ff5294acb3c91bce8c80..e6ad2700403ec79dd4deda041f454f3de5bd0621 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 );