Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Sep 7, 2024
1 parent 4c2b984 commit 36d6d25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PeerConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ const Json::Value PeerConnectionManager::setAnswer(const std::string &peerid, co
{
std::promise<const webrtc::SessionDescriptionInterface *> remotepromise;
rtc::scoped_refptr<SetSessionDescriptionObserver> remoteSessionObserver(SetSessionDescriptionObserver::Create(peerConnection, remotepromise));
peerConnection->SetRemoteDescription(remoteSessionObserver.get(), session_description.get());
peerConnection->SetRemoteDescription(remoteSessionObserver.get(), session_description.release());
// waiting for remote description
std::future<const webrtc::SessionDescriptionInterface *> remotefuture = remotepromise.get_future();
if (remotefuture.wait_for(std::chrono::milliseconds(5000)) == std::future_status::ready)
Expand Down Expand Up @@ -774,7 +774,7 @@ std::unique_ptr<webrtc::SessionDescriptionInterface> PeerConnectionManager::getA
if (!session_description) {
RTC_LOG(LS_WARNING) << "Can't parse received session description message.";
} else {
answer = this->getAnswer(peerid, session_description.get(), videourl, audiourl, options, waitgatheringcompletion);
answer = this->getAnswer(peerid, session_description.release(), videourl, audiourl, options, waitgatheringcompletion);
}
return answer;
}
Expand Down

0 comments on commit 36d6d25

Please sign in to comment.