| Index: webrtc/media/base/videocapturer.cc
|
| diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc
|
| index 704840b180d28b8a755408fe74025ef85350d7e7..df1eafc0d8c96bee4407de999e73d7cb85ac4f80 100644
|
| --- a/webrtc/media/base/videocapturer.cc
|
| +++ b/webrtc/media/base/videocapturer.cc
|
| @@ -205,17 +205,17 @@ void VideoCapturer::OnFrame(const webrtc::VideoFrame& frame,
|
| if (apply_rotation_ && frame.rotation() != webrtc::kVideoRotation_0) {
|
| rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
|
| frame.video_frame_buffer());
|
| - if (buffer->native_handle()) {
|
| - // Sources producing native frames must handle apply_rotation
|
| + if (buffer->type() != webrtc::VideoFrameBuffer::Type::kI420) {
|
| + // Sources producing non-I420 frames must handle apply_rotation
|
| // themselves. But even if they do, we may occasionally end up
|
| // in this case, for frames in flight at the time
|
| // applied_rotation is set to true. In that case, we just drop
|
| // the frame.
|
| - LOG(LS_WARNING) << "Native frame requiring rotation. Discarding.";
|
| + LOG(LS_WARNING) << "Non-I420 frame requiring rotation. Discarding.";
|
| return;
|
| }
|
| broadcaster_.OnFrame(webrtc::VideoFrame(
|
| - webrtc::I420Buffer::Rotate(*buffer, frame.rotation()),
|
| + webrtc::I420Buffer::Rotate(*buffer->GetI420(), frame.rotation()),
|
| webrtc::kVideoRotation_0, frame.timestamp_us()));
|
| } else {
|
| broadcaster_.OnFrame(frame);
|
|
|