Fix flaky ViEEncoder unit test.
The flaky test was introduced in ad9010c9836, and is essentially a race where the ViE Encoder has already configured the quality scaler on the encoder thread before we've updated the ScalingSettings. This CL adds a forced reconfiguration of the quality scaler to avoid this issue. BUG=None TBR=sprang@webrtc.org Review-Url: https://codereview.webrtc.org/2695873004 Cr-Commit-Position: refs/heads/master@{#16612}
This commit is contained in:
parent
5465ef5699
commit
b83797bd7a
@ -1186,6 +1186,9 @@ TEST_F(ViEEncoderTest, InitialFrameDropOffWhenEncoderDisabledScaling) {
|
||||
int frame_height = 360;
|
||||
fake_encoder_.SetQualityScaling(false);
|
||||
vie_encoder_->OnBitrateUpdated(kLowTargetBitrateBps, 0, 0);
|
||||
// Force quality scaler reconfiguration by resetting the source.
|
||||
vie_encoder_->SetSource(&video_source_,
|
||||
VideoSendStream::DegradationPreference::kBalanced);
|
||||
|
||||
video_source_.IncomingCapturedFrame(
|
||||
CreateFrame(1, frame_width, frame_height));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user