From a1f566b28a69512037e36f5194329d9ada46be01 Mon Sep 17 00:00:00 2001 From: Peter Hanspers Date: Wed, 2 May 2018 13:07:53 +0200 Subject: [PATCH] Fix: make sure to call UI APIs from main thread. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I74a54b9d3f445369b66678f97d65b7241d72bead Bug: webrtc:9223 Reviewed-on: https://webrtc-review.googlesource.com/73702 Reviewed-by: Kári Helgason Commit-Queue: Peter Hanspers Cr-Commit-Position: refs/heads/master@{#23104} --- examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m b/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m index d369645d3a..dbd78ea279 100644 --- a/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m +++ b/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m @@ -124,7 +124,11 @@ - (void)appClient:(ARDAppClient *)client didReceiveRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack { self.remoteVideoTrack = remoteVideoTrack; - _videoCallView.statusLabel.hidden = YES; + __weak ARDVideoCallViewController *weakSelf = self; + dispatch_async(dispatch_get_main_queue(), ^{ + ARDVideoCallViewController *strongSelf = weakSelf; + strongSelf.videoCallView.statusLabel.hidden = YES; + }); } - (void)appClient:(ARDAppClient *)client