[vlc-commits] VLCVideoUIView: remove racy assert

Alexandre Janniaux git at videolan.org
Sun Jan 3 15:14:43 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Thu Dec 24 09:13:58 2020 +0100| [20e5fe4a4f4ef43a0d8d51dcc51de45adcaf5b58] | committer: Alexandre Janniaux

VLCVideoUIView: remove racy assert

_enabled is set asynchronously in the main thread whereas
detachFromParent is called from the thread closing the window, which is
usually different from the main thread. Checking _enabled here is racy
and could lead to triggering the assertion.

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

 modules/video_output/apple/VLCVideoUIView.m | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/video_output/apple/VLCVideoUIView.m b/modules/video_output/apple/VLCVideoUIView.m
index 4acbfff8ac..3a4c749816 100644
--- a/modules/video_output/apple/VLCVideoUIView.m
+++ b/modules/video_output/apple/VLCVideoUIView.m
@@ -171,7 +171,6 @@
     /* The UIView must not be attached before releasing. Disable() is doing
      * exactly this asynchronously in the main thread so ensure it was called
      * here before detaching from the parent. */
-    assert(!_enabled);
     _wnd = NULL;
     vlc_mutex_unlock(&_mutex);
 }



More information about the vlc-commits mailing list