Index: webrtc/modules/pacing/packet_router.cc |
diff --git a/webrtc/modules/pacing/packet_router.cc b/webrtc/modules/pacing/packet_router.cc |
index 871ba0fcec984b99d7696a498e21b967bd2d5b8a..b2c71090a8656b43635def98f4a9c77bf224e6ef 100644 |
--- a/webrtc/modules/pacing/packet_router.cc |
+++ b/webrtc/modules/pacing/packet_router.cc |
@@ -22,9 +22,7 @@ namespace webrtc { |
PacketRouter::PacketRouter() |
: last_remb_time_ms_(rtc::TimeMillis()), |
last_send_bitrate_bps_(0), |
- transport_seq_(0) { |
- pacer_thread_checker_.DetachFromThread(); |
-} |
+ transport_seq_(0) {} |
PacketRouter::~PacketRouter() { |
RTC_DCHECK(rtp_send_modules_.empty()); |
@@ -98,7 +96,7 @@ bool PacketRouter::TimeToSendPacket(uint32_t ssrc, |
int64_t capture_timestamp, |
bool retransmission, |
const PacedPacketInfo& pacing_info) { |
- RTC_DCHECK(pacer_thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
rtc::CritScope cs(&modules_crit_); |
for (auto* rtp_module : rtp_send_modules_) { |
if (!rtp_module->SendingMedia()) |
@@ -114,7 +112,7 @@ bool PacketRouter::TimeToSendPacket(uint32_t ssrc, |
size_t PacketRouter::TimeToSendPadding(size_t bytes_to_send, |
const PacedPacketInfo& pacing_info) { |
- RTC_DCHECK(pacer_thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
size_t total_bytes_sent = 0; |
rtc::CritScope cs(&modules_crit_); |
// Rtp modules are ordered by which stream can most benefit from padding. |
@@ -208,7 +206,7 @@ bool PacketRouter::SendRemb(uint32_t bitrate_bps, |
} |
bool PacketRouter::SendTransportFeedback(rtcp::TransportFeedback* packet) { |
- RTC_DCHECK(pacer_thread_checker_.CalledOnValidThread()); |
+ RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
rtc::CritScope cs(&modules_crit_); |
// Prefer send modules. |
for (auto* rtp_module : rtp_send_modules_) { |