[vlc-devel] [PATCH] win32: the vout lock is recursive

Rémi Denis-Courmont remi at remlab.net
Sun Jun 5 14:16:18 CEST 2016


Le 2016-06-05 13:28, Steve Lhomme a écrit :
> given by default they're all recursive it's ok, but when we detect 
> possible
> issues it's not.
> ---
>  modules/video_output/win32/events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/video_output/win32/events.c
> b/modules/video_output/win32/events.c
> index c41fd89..22ad40e 100644
> --- a/modules/video_output/win32/events.c
> +++ b/modules/video_output/win32/events.c
> @@ -467,7 +467,7 @@ event_thread_t *EventThreadCreate( vout_display_t 
> *vd)
>          return NULL;
>
>      p_event->vd = vd;
> -    vlc_mutex_init( &p_event->lock );
> +    vlc_mutex_init_recursive( &p_event->lock );

It looks more like a work-around than a fix. Recursive locking is very 
rarely done right.

>      vlc_cond_init( &p_event->wait );
>
>      p_event->is_cursor_hidden = false;

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list