diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 29c67e1e..d73f9bc1 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -1406,7 +1406,6 @@ void RtcConfigure::RtcTrackConfigure::enableREMB(bool enable){ } void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){ - enable = true; rtcp_mux = true; rtcp_rsize = false; group_bundle = true; @@ -1455,7 +1454,6 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){ break; } case TrackApplication: { - enable = false; break; } default: break; @@ -1575,9 +1573,6 @@ shared_ptr RtcConfigure::createAnswer(const RtcSession &offer){ } void RtcConfigure::matchMedia(shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure){ - if (!configure.enable) { - return; - } bool check_profile = true; bool check_codec = true; @@ -1667,7 +1662,8 @@ RETRY: } case RtpDirection::sendrecv : { //对方支持发送接收,那么最终能力根据配置来决定 - answer_media.direction = configure.direction; + answer_media.direction = (configure.direction == RtpDirection::invalid ? RtpDirection::inactive + : configure.direction); break; } default: continue; diff --git a/webrtc/Sdp.h b/webrtc/Sdp.h index 614cfd50..999df44d 100644 --- a/webrtc/Sdp.h +++ b/webrtc/Sdp.h @@ -684,7 +684,6 @@ public: using Ptr = std::shared_ptr; class RtcTrackConfigure { public: - bool enable; bool rtcp_mux; bool rtcp_rsize; bool group_bundle;