commit | 7281f92e7210fb48f8b34c1bbb8f037808a73868 | [log] [tgz] |
---|---|---|
author | Gustavo Garcia <gustavo@lifeonair.com> | Tue Nov 07 17:54:03 2017 +0100 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Nov 09 09:34:12 2017 +0000 |
tree | 42113fe64ec61dff10b69f0bcfbabd4370a02fd6 | |
parent | 8a47db590d18a1c723ca89bd3e2fd8600b2fd303 [diff] [blame] |
Fix do not initialize OpenGL if VideoView is creating with the app in background Bug: webrtc:8498 Change-Id: I354caf9c2b4dc9e596e97cd9a80dac71b6c89289 Reviewed-on: https://webrtc-review.googlesource.com/20980 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20611}
diff --git a/sdk/objc/Framework/Classes/UI/RTCEAGLVideoView.m b/sdk/objc/Framework/Classes/UI/RTCEAGLVideoView.m index 80282f0..53f5270 100644 --- a/sdk/objc/Framework/Classes/UI/RTCEAGLVideoView.m +++ b/sdk/objc/Framework/Classes/UI/RTCEAGLVideoView.m
@@ -183,7 +183,9 @@ RTCEAGLVideoView *strongSelf = weakSelf; [strongSelf displayLinkTimerDidFire]; }]; - [self setupGL]; + if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive) { + [self setupGL]; + } return YES; }