| Index: media/cast/test/linux_output_window.cc
|
| diff --git a/media/cast/test/linux_output_window.cc b/media/cast/test/linux_output_window.cc
|
| index 735e0dd687f2b636fa007dc64c66703a5fcbd925..389bb0f38eec9e6a883ca6bb1da50680af62a933 100644
|
| --- a/media/cast/test/linux_output_window.cc
|
| +++ b/media/cast/test/linux_output_window.cc
|
| @@ -106,7 +106,6 @@ void LinuxOutputWindow::CreateWindow(int x_pos,
|
| VLOG(1) << "XShmCreateImage failed";
|
| NOTREACHED();
|
| }
|
| - render_buffer_ = reinterpret_cast<uint8_t*>(image_->data);
|
| shminfo_.readOnly = false;
|
|
|
| // Attach image to display.
|
| @@ -119,14 +118,16 @@ void LinuxOutputWindow::CreateWindow(int x_pos,
|
|
|
| void LinuxOutputWindow::RenderFrame(
|
| const scoped_refptr<media::VideoFrame>& video_frame) {
|
| + CHECK_LE(video_frame->coded_size().width(), image_->width);
|
| + CHECK_LE(video_frame->coded_size().height(), image_->height);
|
| libyuv::I420ToARGB(video_frame->data(VideoFrame::kYPlane),
|
| video_frame->stride(VideoFrame::kYPlane),
|
| video_frame->data(VideoFrame::kUPlane),
|
| video_frame->stride(VideoFrame::kUPlane),
|
| video_frame->data(VideoFrame::kVPlane),
|
| video_frame->stride(VideoFrame::kVPlane),
|
| - render_buffer_,
|
| - video_frame->stride(VideoFrame::kYPlane) * 4,
|
| + reinterpret_cast<uint8_t*>(image_->data),
|
| + image_->bytes_per_line,
|
| video_frame->coded_size().width(),
|
| video_frame->coded_size().height());
|
|
|
| @@ -149,4 +150,4 @@ void LinuxOutputWindow::RenderFrame(
|
|
|
| } // namespace test
|
| } // namespace cast
|
| -} // namespace media
|
| +} // namespace media
|
|
|