Don't assume we have a worker_thread_ on linux (for now)

Tbr: mbonadei@webrtc.org
No-Try: true
Bug: none
Change-Id: I0dca1e54b610b63651235a83ec80f0e7d76f51c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173085
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31019}
This commit is contained in:
Tommi 2020-04-07 20:40:23 +02:00 committed by Commit Bot
parent d926cf63b5
commit 9ba33f1ce9

View File

@ -769,6 +769,7 @@ void ReceiveStatisticsProxy::OnTimingFrameInfoUpdated(
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
uint32_t ssrc,
const RtcpPacketTypeCounter& packet_counter) {
#if !defined(WEBRTC_LINUX)
if (!worker_thread_->IsCurrent()) {
// RtpRtcp::Configuration has a single RtcpPacketTypeCounterObserver and
// that same configuration may be used for both receiver and sender
@ -791,6 +792,7 @@ void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
}
RTC_DCHECK_RUN_ON(&main_thread_);
#endif
rtc::CritScope lock(&crit_);
if (stats_.ssrc != ssrc)
return;