Index: webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm b/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm |
index 5b2d2586b156fd5cc68840ca5a28619c76ec7690..dcce32d8331649ab0ec965b66392ae9e9ca249aa 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm |
@@ -12,6 +12,8 @@ |
#include <memory> |
+#include "webrtc/media/engine/webrtcvideoframe.h" |
+ |
@implementation RTCVideoFrame { |
std::unique_ptr<cricket::VideoFrame> _videoFrame; |
rtc::scoped_refptr<webrtc::VideoFrameBuffer> _i420Buffer; |
@@ -105,7 +107,10 @@ |
if (self = [super init]) { |
// Keep a shallow copy of the video frame. The underlying frame buffer is |
// not copied. |
- _videoFrame.reset(nativeFrame->Copy()); |
+ _videoFrame.reset(new cricket::WebRtcVideoFrame( |
+ nativeFrame->video_frame_buffer(), |
+ nativeFrame->rotation(), |
+ nativeFrame->timestamp_us())); |
} |
return self; |
} |