Index: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc |
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc |
index 7d04f23958890903ae393956a2a1774721702b82..5f6a231288d9350a523205f88da2e0cc829fe2fa 100644 |
--- a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc |
+++ b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc |
@@ -168,10 +168,14 @@ bool CopyVideoFrameToPixelBuffer(const webrtc::VideoFrame& frame, |
int dst_stride_uv = CVPixelBufferGetBytesPerRowOfPlane(pixel_buffer, 1); |
// Convert I420 to NV12. |
int ret = libyuv::I420ToNV12( |
- frame.buffer(webrtc::kYPlane), frame.stride(webrtc::kYPlane), |
- frame.buffer(webrtc::kUPlane), frame.stride(webrtc::kUPlane), |
- frame.buffer(webrtc::kVPlane), frame.stride(webrtc::kVPlane), dst_y, |
- dst_stride_y, dst_uv, dst_stride_uv, frame.width(), frame.height()); |
+ frame.video_frame_buffer()->DataY(), |
+ frame.video_frame_buffer()->StrideY(), |
+ frame.video_frame_buffer()->DataU(), |
+ frame.video_frame_buffer()->StrideU(), |
+ frame.video_frame_buffer()->DataV(), |
+ frame.video_frame_buffer()->StrideV(), |
+ dst_y, dst_stride_y, dst_uv, dst_stride_uv, |
+ frame.width(), frame.height()); |
CVPixelBufferUnlockBaseAddress(pixel_buffer, 0); |
if (ret) { |
LOG(LS_ERROR) << "Error converting I420 VideoFrame to NV12 :" << ret; |