diff --git a/rtc_base/time/BUILD.gn b/rtc_base/time/BUILD.gn index 092abd9a83..bac649e1d7 100644 --- a/rtc_base/time/BUILD.gn +++ b/rtc_base/time/BUILD.gn @@ -18,7 +18,6 @@ rtc_library("timestamp_extrapolator") { "timestamp_extrapolator.h", ] deps = [ - "../../api/units:frequency", "../../api/units:timestamp", "../../modules:module_api_public", ] diff --git a/rtc_base/time/timestamp_extrapolator.cc b/rtc_base/time/timestamp_extrapolator.cc index 910db8a390..4f8fe0a914 100644 --- a/rtc_base/time/timestamp_extrapolator.cc +++ b/rtc_base/time/timestamp_extrapolator.cc @@ -13,7 +13,6 @@ #include #include "absl/types/optional.h" -#include "api/units/frequency.h" #include "modules/include/module_common_types_public.h" namespace webrtc { @@ -130,8 +129,9 @@ absl::optional TimestampExtrapolator::ExtrapolateLocalTime( if (!first_unwrapped_timestamp_) { return absl::nullopt; } else if (packet_count_ < kStartUpFilterDelayInPackets) { - constexpr Frequency k90KHz = Frequency::KiloHertz(90); - TimeDelta diff = (unwrapped_ts90khz - *prev_unwrapped_timestamp_) / k90KHz; + constexpr double kRtpTicksPerMs = 90; + TimeDelta diff = TimeDelta::Millis( + (unwrapped_ts90khz - *prev_unwrapped_timestamp_) / kRtpTicksPerMs); return prev_ + diff; } else if (w_[0] < 1e-3) { return start_;