[vlc-devel] [PATCH] win32: the vout lock is recursive
robux4 at gmail.com
Sun Jun 5 14:58:23 CEST 2016
On Sun, Jun 5, 2016 at 2:16 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2016-06-05 13:28, Steve Lhomme a écrit :
>> given by default they're all recursive it's ok, but when we detect
>> 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
>> 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.
I agree but the lock seems widely used for a lot of things. I got the
assert when called via Windows callbacks called through Windows API
calls. It's hard to tell if these functions are only called in the UI
thread, if the variables are used by other threads or only the UI one.
I'll see if I find only a few things that need changes.
>> vlc_cond_init( &p_event->wait );
>> p_event->is_cursor_hidden = false;
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel