Index: webrtc/media/base/fakevideocapturer.h |
diff --git a/webrtc/media/base/fakevideocapturer.h b/webrtc/media/base/fakevideocapturer.h |
index ff786f20577e12ebec1b1a3be5215ea1f74e1694..8ba56f1e6f1971ee1e27aefcd823316598ff818d 100644 |
--- a/webrtc/media/base/fakevideocapturer.h |
+++ b/webrtc/media/base/fakevideocapturer.h |
@@ -29,7 +29,7 @@ |
// Fake video capturer that allows the test to manually pump in frames. |
class FakeVideoCapturer : public cricket::VideoCapturer { |
public: |
- explicit FakeVideoCapturer(bool is_screencast) |
+ FakeVideoCapturer(bool is_screencast) |
: running_(false), |
initial_timestamp_(rtc::TimeNanos()), |
next_timestamp_(rtc::kNumNanosecsPerMillisec), |
@@ -124,7 +124,10 @@ |
sigslot::signal1<FakeVideoCapturer*> SignalDestroyed; |
cricket::CaptureState Start(const cricket::VideoFormat& format) override { |
- SetCaptureFormat(&format); |
+ cricket::VideoFormat supported; |
+ if (GetBestCaptureFormat(format, &supported)) { |
+ SetCaptureFormat(&supported); |
+ } |
running_ = true; |
SetCaptureState(cricket::CS_RUNNING); |
return cricket::CS_RUNNING; |