[vlc-commits] bonjour: Work around a macOS 10.12 bug

Marvin Scholz git at videolan.org
Tue Dec 6 10:26:19 CET 2016


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Dec  6 09:29:42 2016 +0100| [a7e4516f19b80efdd8743704920adb504ffaff60] | committer: Marvin Scholz

bonjour: Work around a macOS 10.12 bug

NSNetServiceBrowser and NSNetService do not properly release the
delegates, see https://crbug.com/657495 and
https://openradar.appspot.com/28943305

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

 modules/services_discovery/bonjour.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/services_discovery/bonjour.m b/modules/services_discovery/bonjour.m
index cd9cb3a..3181fbf 100644
--- a/modules/services_discovery/bonjour.m
+++ b/modules/services_discovery/bonjour.m
@@ -207,6 +207,10 @@ NSString *const VLCBonjourRendererDemux         = @"VLCBonjourRendererDemux";
 {
     [_serviceBrowsers makeObjectsPerformSelector:@selector(stop)];
 
+    /* Work around a macOS 10.12 bug, see https://openradar.appspot.com/28943305 */
+    [_serviceBrowsers makeObjectsPerformSelector:@selector(setDelegate:) withObject:nil];
+    [_resolvedNetServices makeObjectsPerformSelector:@selector(setDelegate:) withObject:nil];
+
     for (NSValue *item in _inputItemsForNetServices) {
         if (_isRendererDiscovery) {
             [self removeRawRendererItem:item];



More information about the vlc-commits mailing list