From a3bbcff19d8956a8ec3f8efb83e3286e4b0f20bc Mon Sep 17 00:00:00 2001 From: Maxime Chapelet Date: Tue, 10 May 2022 13:11:02 +0200 Subject: [PATCH] VLCVideoUIView: fix display link's runloop run that wasn't terminated Ensure dummy source removal is effective by waking up the runloop --- modules/video_output/apple/VLCVideoUIView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/video_output/apple/VLCVideoUIView.m b/modules/video_output/apple/VLCVideoUIView.m index ffb9e6450d..24d047db68 100644 --- a/modules/video_output/apple/VLCVideoUIView.m +++ b/modules/video_output/apple/VLCVideoUIView.m @@ -364,6 +364,9 @@ static CFHashCode DisplayLinkDummySourceHash(const void *info) { /// We have to invalidate the dummy source to remove it from the display link runloop CFRunLoopSourceInvalidate(_displayLinkRunLoopDummySource); CFRelease(_displayLinkRunLoopDummySource); + /// We have to wake up the runloop to ensure the source removal is effective + /// and to have the runloop being stopped + CFRunLoopWakeUp(_displayLinkRunLoop.getCFRunLoop); _displayLinkRunLoopDummySource = NULL; _displayLinkRunLoop = nil;