[vlc-commits] ios vout: signal while holding the lock

Rémi Denis-Courmont git at videolan.org
Tue Feb 4 19:02:09 CET 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb  3 22:45:49 2020 +0200| [d38c60078b4f61f83b000757230d72ec47a3902e] | committer: Rémi Denis-Courmont

ios vout: 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=d38c60078b4f61f83b000757230d72ec47a3902e
---

 modules/video_output/ios.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 695cde9f50..9a075194f2 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -621,8 +621,8 @@ static void GLESSwap(vlc_gl_t *gl)
     vlc_mutex_lock(&_mutex);
     assert(_gl_attached);
     _gl_attached = NO;
-    vlc_mutex_unlock(&_mutex);
     vlc_cond_signal(&_gl_attached_wait);
+    vlc_mutex_unlock(&_mutex);
 }
 
 - (void)presentRenderbuffer



More information about the vlc-commits mailing list