Index: webrtc/pc/mediacontroller.cc |
diff --git a/webrtc/pc/mediacontroller.cc b/webrtc/pc/mediacontroller.cc |
index fa8acadddcc5229b7126c4b4c2c9cdc7b34b25fb..ead69ad1044de0cdb4bcd2a641dd77712e3578ae 100644 |
--- a/webrtc/pc/mediacontroller.cc |
+++ b/webrtc/pc/mediacontroller.cc |
@@ -63,6 +63,20 @@ class MediaController : public webrtc::MediaControllerInterface, |
} |
const cricket::MediaConfig& config() const override { return media_config_; } |
+ // Call's SetVideoReceiveRtpHeaderExtensions can be called on any thread, |
+ // but we need to go via worker_thread_ to access the call_ pointer. |
+ void SetVideoReceiveRtpHeaderExtensions( |
+ const std::vector<webrtc::RtpExtension>& extensions) override { |
+ if (!worker_thread_->IsCurrent()) { |
+ worker_thread_->Invoke<void>( |
+ RTC_FROM_HERE, |
+ rtc::Bind(&MediaController::SetVideoReceiveRtpHeaderExtensions, |
+ this, extensions)); |
+ return; |
+ } |
+ call_w()->SetVideoReceiveRtpHeaderExtensions(extensions); |
+ } |
+ |
private: |
void Construct_w(cricket::MediaEngineInterface* media_engine) { |
RTC_DCHECK(worker_thread_->IsCurrent()); |