[vlc-commits] win32/inhibit: signal while holding the lock
Rémi Denis-Courmont
git at videolan.org
Tue Feb 4 19:02:08 CET 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 3 22:45:49 2020 +0200| [79ebf9e74ebed35102446d62ebbaea91f43dbc56] | committer: Rémi Denis-Courmont
win32/inhibit: signal while holding the lock
This is the 21st century. The C run-time threading subsystem knows better
than you how to optimise condition variables.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79ebf9e74ebed35102446d62ebbaea91f43dbc56
---
modules/video_output/win32/inhibit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/video_output/win32/inhibit.c b/modules/video_output/win32/inhibit.c
index d23dcc33e4..566b311189 100644
--- a/modules/video_output/win32/inhibit.c
+++ b/modules/video_output/win32/inhibit.c
@@ -42,8 +42,8 @@ static void Inhibit (vlc_inhibit_t *ih, unsigned mask)
vlc_inhibit_sys_t *sys = ih->p_sys;
vlc_mutex_lock(&sys->mutex);
sys->mask = mask;
- vlc_mutex_unlock(&sys->mutex);
vlc_cond_signal(&sys->cond);
+ vlc_mutex_unlock(&sys->mutex);
}
static void RestoreStateOnCancel( void* p_opaque )
More information about the vlc-commits
mailing list