Commit 4c43f650 authored by Tristan Matthews's avatar Tristan Matthews

* #12426: sdp/video: don't bother parsing empty SDP descriptions

parent d17e3dcb
......@@ -473,7 +473,7 @@ string Sdp::getIncomingVideoDescription() const
if (videoIdx == activeLocalSession_->media_count) {
DEBUG("No video present in local session");
return ss.str();
return "";
}
// get direction string
......
......@@ -53,13 +53,17 @@ void VideoRtpSession::updateSDP(const Sdp &sdp)
{
string desc(sdp.getIncomingVideoDescription());
// if port has changed
if (desc != rxArgs_["receiving_sdp"]) {
if (not desc.empty() and desc != rxArgs_["receiving_sdp"]) {
rxArgs_["receiving_sdp"] = desc;
DEBUG("Updated incoming SDP to:\n %s",
rxArgs_["receiving_sdp"].c_str());
}
if (desc.find("sendrecv") != string::npos) {
if (desc.empty()) {
DEBUG("Video is inactive");
receiving_ = false;
sending_ = false;
} else if (desc.find("sendrecv") != string::npos) {
DEBUG("Sending and receiving video");
receiving_ = true;
sending_ = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment