diff --git a/daemon/src/sip/sdp.cpp b/daemon/src/sip/sdp.cpp index cd9e477a69504e9b7d71a4ba9db715eaee30f974..c2607c2d41f1862cb1f5635f1582188cc3381ff8 100644 --- a/daemon/src/sip/sdp.cpp +++ b/daemon/src/sip/sdp.cpp @@ -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 diff --git a/daemon/src/video/video_rtp_session.cpp b/daemon/src/video/video_rtp_session.cpp index 2976598dcaa3333d0632f3483eaf71b75923638a..8c89092ababaef15d2cafb5c0aef7e45684bf047 100644 --- a/daemon/src/video/video_rtp_session.cpp +++ b/daemon/src/video/video_rtp_session.cpp @@ -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;