summaryrefslogtreecommitdiff
path: root/app/webrtc/objc/RTCEAGLVideoView.m
diff options
context:
space:
mode:
Diffstat (limited to 'app/webrtc/objc/RTCEAGLVideoView.m')
-rw-r--r--app/webrtc/objc/RTCEAGLVideoView.m9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/webrtc/objc/RTCEAGLVideoView.m b/app/webrtc/objc/RTCEAGLVideoView.m
index 5365d98..faacef6 100644
--- a/app/webrtc/objc/RTCEAGLVideoView.m
+++ b/app/webrtc/objc/RTCEAGLVideoView.m
@@ -173,6 +173,7 @@
return;
}
[_videoTrack removeRenderer:_videoRenderer];
+ self.i420Frame = nil;
_videoTrack = videoTrack;
[_videoTrack addRenderer:_videoRenderer];
// TODO(tkchin): potentially handle changes in track state - e.g. render
@@ -191,11 +192,9 @@
// This method is called when the GLKView's content is dirty and needs to be
// redrawn. This occurs on main thread.
- (void)glkView:(GLKView*)view drawInRect:(CGRect)rect {
- if (self.i420Frame) {
- // The renderer will draw the frame to the framebuffer corresponding to the
- // one used by |view|.
- [_glRenderer drawFrame:self.i420Frame];
- }
+ // The renderer will draw the frame to the framebuffer corresponding to the
+ // one used by |view|.
+ [_glRenderer drawFrame:self.i420Frame];
}
#pragma mark - Private