Index: webrtc/media/base/videocapturer_unittest.cc |
diff --git a/webrtc/media/base/videocapturer_unittest.cc b/webrtc/media/base/videocapturer_unittest.cc |
index 0e6f992934962c6d981670f41a13d842f884437b..2dc5cec70c54e1415a23b85f3c2d30e83b25af69 100644 |
--- a/webrtc/media/base/videocapturer_unittest.cc |
+++ b/webrtc/media/base/videocapturer_unittest.cc |
@@ -266,7 +266,7 @@ TEST_F(VideoCapturerTest, SinkWantsMaxPixelAndMaxPixelCountStepUp) { |
// with less than or equal to |wants.max_pixel_count| depending on how the |
// capturer can scale the input frame size. |
rtc::VideoSinkWants wants; |
- wants.max_pixel_count = rtc::Optional<int>(1280 * 720 * 3 / 5); |
+ wants.max_pixel_count = 1280 * 720 * 3 / 5; |
capturer_->AddOrUpdateSink(&renderer_, wants); |
EXPECT_TRUE(capturer_->CaptureFrame()); |
EXPECT_EQ(2, renderer_.num_rendered_frames()); |
@@ -274,8 +274,7 @@ TEST_F(VideoCapturerTest, SinkWantsMaxPixelAndMaxPixelCountStepUp) { |
EXPECT_EQ(540, renderer_.height()); |
// Request a lower resolution. |
- wants.max_pixel_count = |
- rtc::Optional<int>((renderer_.width() * renderer_.height() * 3) / 5); |
+ wants.max_pixel_count = (renderer_.width() * renderer_.height() * 3) / 5; |
capturer_->AddOrUpdateSink(&renderer_, wants); |
EXPECT_TRUE(capturer_->CaptureFrame()); |
EXPECT_EQ(3, renderer_.num_rendered_frames()); |
@@ -294,8 +293,8 @@ TEST_F(VideoCapturerTest, SinkWantsMaxPixelAndMaxPixelCountStepUp) { |
EXPECT_EQ(360, renderer2.height()); |
// Request higher resolution. |
- wants.target_pixel_count.emplace((*wants.max_pixel_count * 5) / 3); |
- wants.max_pixel_count.emplace(*wants.max_pixel_count * 4); |
+ wants.target_pixel_count.emplace((wants.max_pixel_count * 5) / 3); |
+ wants.max_pixel_count = wants.max_pixel_count * 4; |
capturer_->AddOrUpdateSink(&renderer_, wants); |
EXPECT_TRUE(capturer_->CaptureFrame()); |
EXPECT_EQ(5, renderer_.num_rendered_frames()); |