[vlc-commits] ios: fix deadlock by removing synchronized self

Carola Nitz git at videolan.org
Wed Aug 30 17:29:19 CEST 2017


vlc | branch: master | Carola Nitz <nitz.carola at googlemail.com> | Wed Aug 30 16:22:22 2017 +0200| [bb538b4eae7163bb1205f17a6b466deeca87302a] | committer: Felix Paul Kühne

ios: fix deadlock by removing synchronized self

Signed-off-by: Felix Paul Kühne <felix at serioese.gmbh>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb538b4eae7163bb1205f17a6b466deeca87302a
---

 modules/video_output/ios.m | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 4ddc0e0957..dd590b97eb 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -633,22 +633,19 @@ static void OpenglESSwap(vlc_gl_t *gl)
     [EAGLContext setCurrentContext:_eaglContext];
 
     CGSize viewSize = [self bounds].size;
-
+    CGFloat scaleFactor = self.contentScaleFactor;
     vout_display_place_t place;
 
-    @synchronized (self) {
-        if (_voutDisplay) {
-            vout_display_cfg_t cfg_tmp = *(_voutDisplay->cfg);
-            CGFloat scaleFactor = self.contentScaleFactor;
+    if (_voutDisplay) {
+        vout_display_cfg_t cfg_tmp = *(_voutDisplay->cfg);
 
-            cfg_tmp.display.width  = viewSize.width * scaleFactor;
-            cfg_tmp.display.height = viewSize.height * scaleFactor;
+        cfg_tmp.display.width  = viewSize.width * scaleFactor;
+        cfg_tmp.display.height = viewSize.height * scaleFactor;
 
-            vout_display_PlacePicture(&place, &_voutDisplay->source, &cfg_tmp, false);
-            _voutDisplay->sys->place = place;
-            vout_display_SendEventDisplaySize(_voutDisplay, viewSize.width * scaleFactor,
-                                              viewSize.height * scaleFactor);
-        }
+        vout_display_PlacePicture(&place, &_voutDisplay->source, &cfg_tmp, false);
+        _voutDisplay->sys->place = place;
+        vout_display_SendEventDisplaySize(_voutDisplay, viewSize.width * scaleFactor,
+                                          viewSize.height * scaleFactor);
     }
 
     // x / y are top left corner, but we need the lower left one



More information about the vlc-commits mailing list