Index: webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm b/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm |
index aaf7e7129627d82819b7012ed115aebc99db008f..bfd6eebe7ebe70077d92dfe23f2111a1346aa021 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm |
@@ -48,16 +48,20 @@ |
_nv12Shader = [[RTCNativeNV12Shader alloc] initWithContext:_context]; |
} |
shader = _nv12Shader; |
-#else |
- // Rendering native CVPixelBuffer is not supported on OS X. |
- if (false) { |
-#endif |
} else { |
if (!_i420Shader) { |
_i420Shader = [[RTCI420Shader alloc] initWithContext:_context]; |
} |
shader = _i420Shader; |
} |
+#else |
+ // Rendering native CVPixelBuffer is not supported on OS X. |
+ frame = [frame newI420VideoFrame]; |
+ if (!_i420Shader) { |
+ _i420Shader = [[RTCI420Shader alloc] initWithContext:_context]; |
+ } |
+ shader = _i420Shader; |
+#endif |
if (!shader || ![shader drawFrame:frame]) { |
return NO; |
} |