Fix stringstream in Group VoIP

This commit is contained in:
luvletter2333 2021-09-20 13:33:34 +08:00
parent af3b235626
commit 43001f700a
No known key found for this signature in database
GPG Key ID: BFD68B892BECC1D8
1 changed files with 3 additions and 2 deletions

View File

@ -1402,7 +1402,7 @@ public:
void start() {
const auto weak = std::weak_ptr<GroupInstanceCustomInternal>(shared_from_this());
std::ostringstream stringStream;
std::stringstream stringStream;
stringStream << "WebRTC-Audio-Allocation/min:" << _outgoingAudioBitrateKbit << "kbps,max:" << _outgoingAudioBitrateKbit << "kbps/"
<< "WebRTC-Audio-OpusMinPacketLossRate/Enabled-1/"
<< "WebRTC-TaskQueuePacer/Enabled/"
@ -1411,7 +1411,8 @@ public:
// << "WebRTC-MutedStateKillSwitch/Enabled/"
// << "WebRTC-VP8IosMaxNumberOfThread/max_thread:1/"
webrtc::field_trial::InitFieldTrialsFromString(stringStream.str().c_str());
auto webrtcInitStr = stringStream.str();
webrtc::field_trial::InitFieldTrialsFromString(webrtcInitStr.c_str());
_networkManager.reset(new ThreadLocalObject<GroupNetworkManager>(_threads->getNetworkThread(), [weak, threads = _threads] () mutable {
return new GroupNetworkManager(