Commit 1c795114 authored by Laurent Aimar's avatar Laurent Aimar

Reduced a lock visibility to directx only (msw).

It was useless for all other vout modules.
parent 004b3ab6
......@@ -84,7 +84,6 @@ 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 );
var_Create( p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
......@@ -145,8 +144,6 @@ void CommonClean( vout_thread_t *p_vout )
EventThreadDestroy( p_sys->p_event );
}
vlc_mutex_destroy( &p_sys->lock );
#if !defined(UNDER_CE) && !defined(MODULE_NAME_IS_glwin32)
RestoreScreensaver( p_vout );
#endif
......@@ -156,14 +153,11 @@ void CommonManage( vout_thread_t *p_vout )
{
/* If we do not control our window, we check for geometry changes
* ourselves because the parent might not send us its events. */
vlc_mutex_lock( &p_vout->p_sys->lock );
if( p_vout->p_sys->hparent && !p_vout->b_fullscreen )
{
RECT rect_parent;
POINT point;
vlc_mutex_unlock( &p_vout->p_sys->lock );
GetClientRect( p_vout->p_sys->hparent, &rect_parent );
point.x = point.y = 0;
ClientToScreen( p_vout->p_sys->hparent, &point );
......@@ -204,10 +198,6 @@ void CommonManage( vout_thread_t *p_vout )
#endif
}
}
else
{
vlc_mutex_unlock( &p_vout->p_sys->lock );
}
/* */
p_vout->p_sys->i_changes |= EventThreadRetreiveChanges( p_vout->p_sys->p_event );
......
......@@ -218,6 +218,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout->p_sys = calloc( 1, sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
return VLC_ENOMEM;
vlc_mutex_init( &p_vout->p_sys->lock );
/* Initialisations */
p_vout->pf_init = Init;
......@@ -431,6 +432,7 @@ static void CloseVideo( vlc_object_t *p_this )
CommonClean( p_vout );
vlc_mutex_destroy( &p_vout->p_sys->lock );
free( p_vout->p_sys );
}
......
......@@ -140,6 +140,7 @@ struct vout_sys_t
LPDIRECTDRAWSURFACE2 p_current_surface; /* surface currently displayed */
LPDIRECTDRAWCLIPPER p_clipper; /* clipper used for blitting */
HINSTANCE hddraw_dll; /* handle of the opened ddraw dll */
vlc_mutex_t lock;
#endif
#ifdef MODULE_NAME_IS_glwin32
......@@ -207,7 +208,6 @@ struct vout_sys_t
#endif
event_thread_t *p_event;
vlc_mutex_t lock;
};
#ifdef MODULE_NAME_IS_wingapi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment