Fixing unsafe conversion
The bot "Win (more_configs)" has spotted another unsafe type conversion. This CL is a follow-up of: - https://webrtc-review.googlesource.com/c/src/+/12921 - https://webrtc-review.googlesource.com/c/src/+/13122 Bug: chromium:759980 Change-Id: I3634c3e20fcd9f4e106914399ac40ca87d4c6137 No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/13622 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20349}
This commit is contained in:
committed by
Commit Bot
parent
712048c64f
commit
ea7a3f8225
@ -569,7 +569,7 @@ TEST_F(NetEqImplTest, ReorderedPacket) {
|
||||
EXPECT_CALL(mock_decoder, IncomingPacket(_, kPayloadLengthBytes, _, _, _))
|
||||
.WillRepeatedly(Return(0));
|
||||
EXPECT_CALL(mock_decoder, PacketDuration(_, kPayloadLengthBytes))
|
||||
.WillRepeatedly(Return(kPayloadLengthSamples));
|
||||
.WillRepeatedly(Return(rtc::checked_cast<int>(kPayloadLengthSamples)));
|
||||
int16_t dummy_output[kPayloadLengthSamples] = {0};
|
||||
// The below expectation will make the mock decoder write
|
||||
// |kPayloadLengthSamples| zeros to the output array, and mark it as speech.
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/audio_processing/aec/aec_core.h"
|
||||
#include "modules/audio_processing/aec/echo_cancellation.h"
|
||||
#include "rtc_base/safe_conversions.h"
|
||||
#include "test/gtest.h"
|
||||
#include "typedefs.h" // NOLINT(build/include)
|
||||
namespace webrtc {
|
||||
@ -240,8 +241,9 @@ TEST_F(SystemDelayTest, CorrectDelayAfterStableStartup) {
|
||||
static_cast<int>(kDeviceBufMs * samples_per_frame_ / 10);
|
||||
EXPECT_GE(average_reported_delay, WebRtcAec_system_delay(self_->aec));
|
||||
int lower_bound = WebRtcAec_extended_filter_enabled(self_->aec)
|
||||
? average_reported_delay / 2 - samples_per_frame_
|
||||
: average_reported_delay * 3 / 4;
|
||||
? (average_reported_delay / 2 -
|
||||
rtc::checked_cast<int>(samples_per_frame_))
|
||||
: average_reported_delay * 3 / 4;
|
||||
EXPECT_LE(lower_bound, WebRtcAec_system_delay(self_->aec));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user