Browse Source

VLCVideoUIView: fix display link's runloop run that wasn't terminated

Ensure dummy source removal is effective by waking up the runloop
Maxime Chapelet 4 years ago
committed by Alexandre Janniaux
parent
commit
a3bbcff19d
  1. 3
      modules/video_output/apple/VLCVideoUIView.m

3
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;

Loading…
Cancel
Save