Fatal error in: …/…/rtc_base/thread.cc, line 950
last system error: 0
Check failed: current_thread->IsInvokeToThreadAllowed(this)
webrtc有三大线程,线程之间的并不能随便调用,也就是不同的函数工作在不同的线程中,因此在使用C++api或者改动源码时一定要注意,不同的函数里不能随意调用其他的接口api,可能会报这个错误。笔者是在推流断网重连后,在以下函数中调用了拉流的代码报出的以上错误。
void OnIceConnectionChange(
webrtc::PeerConnectionInterface::IceConnectionState new_state) override
{