[vlc-devel] [PATCH] VLCVideoUIView: remove racy assert

Alexandre Janniaux ajanni at videolabs.io
Thu Dec 24 08:35:12 UTC 2020


_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.
---
 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);
 }
-- 
2.29.2



More information about the vlc-devel mailing list