Chromium Code Reviews| Index: webrtc/media/devices/carbonvideorenderer.cc |
| diff --git a/webrtc/media/devices/carbonvideorenderer.cc b/webrtc/media/devices/carbonvideorenderer.cc |
| index a1ff6306201c6b7435837450e332d17dac95468f..fba68e8e38063cd2c29e40e637afea2c37f999d0 100644 |
| --- a/webrtc/media/devices/carbonvideorenderer.cc |
| +++ b/webrtc/media/devices/carbonvideorenderer.cc |
| @@ -106,19 +106,19 @@ bool CarbonVideoRenderer::SetSize(int width, int height) { |
| void CarbonVideoRenderer::OnFrame(const VideoFrame& video_frame) { |
| { |
| - const VideoFrame* frame = video_frame->GetCopyWithRotationApplied(); |
| - |
| - if (!SetSize(frame->width(), frame->height())) { |
|
magjed_webrtc
2016/08/26 12:04:15
Don't we need this SetSize call anymore? It looks
nisse-webrtc
2016/08/26 12:31:40
Good catch, that was not an intended change.
(And
|
| - return false; |
| - } |
| + const cricket::WebRtcVideoFrame frame( |
| + webrtc::VideoFrameBuffer::Rotate(video_frame.video_frame_buffer(), |
| + video_frame.rotation()), |
| + webrtc::kVideoRotation_0, |
| + video_frame.timestamp_us()); |
| // Grab the image lock so we are not trashing up the image being drawn. |
| rtc::CritScope cs(&image_crit_); |
| - frame->ConvertToRgbBuffer(cricket::FOURCC_ABGR, |
| - image_.get(), |
| - static_cast<size_t>(frame->width()) * |
| - frame->height() * 4, |
| - frame->width() * 4); |
| + frame.ConvertToRgbBuffer(cricket::FOURCC_ABGR, |
| + image_.get(), |
| + static_cast<size_t>(frame.width()) * |
| + frame.height() * 4, |
| + frame.width() * 4); |
| } |
| // Trigger a repaint event for the whole window. |