Skip to content

Commit

Permalink
Avoid reinitializing pipeline and other things on a setMaxBW (lynckia…
Browse files Browse the repository at this point in the history
  • Loading branch information
lodoyun authored Feb 17, 2017
1 parent a8be77f commit 4b092bc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions erizo/src/erizo/WebRtcConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,18 @@ bool WebRtcConnection::createOffer(bool videoEnabled, bool audioEnabled, bool bu

bool WebRtcConnection::setRemoteSdp(const std::string &sdp) {
ELOG_DEBUG("%s message: setting remote SDP", toLog());

remoteSdp_.initWithSdp(sdp, "");

if (remoteSdp_.videoBandwidth != 0) {
ELOG_DEBUG("%s message: Setting remote BW, maxVideoBW: %u", toLog(), remoteSdp_.videoBandwidth);
this->rtcp_processor_->setMaxVideoBW(remoteSdp_.videoBandwidth*1000);
}

if (pipeline_initialized_)
return true;


bundle_ = remoteSdp_.isBundle;
localSdp_.setOfferSdp(remoteSdp_);
extProcessor_.setSdpInfo(localSdp_);
Expand Down Expand Up @@ -220,10 +230,6 @@ bool WebRtcConnection::setRemoteSdp(const std::string &sdp) {
}


if (remoteSdp_.videoBandwidth != 0) {
ELOG_DEBUG("%s message: Setting remote BW, maxVideoBW: %u", toLog(), remoteSdp_.videoBandwidth);
this->rtcp_processor_->setMaxVideoBW(remoteSdp_.videoBandwidth*1000);
}

initializePipeline();

Expand Down

0 comments on commit 4b092bc

Please sign in to comment.