Remove Invoke from BaseChannel::SetPayloadTypeDemuxingEnabled
The Invoke() isn't necessary as the method is always called on the
correct thread (now enforced with a DCHECK).
Bug: webrtc:12726
Change-Id: I53bbdabc5d6de1316e7cf478d8912e19dd0e45e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216690
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33899}
diff --git a/pc/channel.cc b/pc/channel.cc
index 0ed5665..883e82b 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -326,11 +326,9 @@
}
bool BaseChannel::SetPayloadTypeDemuxingEnabled(bool enabled) {
+ RTC_DCHECK_RUN_ON(worker_thread());
TRACE_EVENT0("webrtc", "BaseChannel::SetPayloadTypeDemuxingEnabled");
- return InvokeOnWorker<bool>(RTC_FROM_HERE, [this, enabled] {
- RTC_DCHECK_RUN_ON(worker_thread());
- return SetPayloadTypeDemuxingEnabled_w(enabled);
- });
+ return SetPayloadTypeDemuxingEnabled_w(enabled);
}
bool BaseChannel::IsReadyToReceiveMedia_w() const {