diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 8a5f6f02..38506b5e 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -1535,7 +1535,7 @@ static map toMap(const vectorcodec)) { if (plan.sample_rate != _rtsp_audio_plan->sample_rate || plan.channel != _rtsp_audio_plan->channel) { //音频采样率和通道数必须相同 @@ -1548,12 +1548,12 @@ bool RtcConfigure::onMatchCodecPlan(const RtcCodecPlan &plan, CodecId codec){ auto rtc_fmt_map = toMap(plan.fmtp); auto rtsp_fmt_map = toMap(_rtsp_video_plan->fmtp); auto &profile = rtsp_fmt_map[kProfile]; - if (!profile.empty() && profile != rtc_fmt_map[kProfile]) { + if (!profile.empty() && strcasecmp(profile.data(), rtc_fmt_map[kProfile].data())) { //profile-level-id 不匹配 return false; } auto &mode = rtsp_fmt_map[kMode]; - if (!mode.empty() && mode != rtc_fmt_map[kMode]) { + if (!mode.empty() && atoi(mode.data()) != atoi(rtc_fmt_map[kMode].data())) { //packetization-mode不匹配 return false; } diff --git a/webrtc/Sdp.h b/webrtc/Sdp.h index 7fc0b0b9..2a9eb6ee 100644 --- a/webrtc/Sdp.h +++ b/webrtc/Sdp.h @@ -708,7 +708,7 @@ public: private: void matchMedia(shared_ptr &ret, TrackType type, const vector &medias, const RtcTrackConfigure &configure); - bool onMatchCodecPlan(const RtcCodecPlan &plan, CodecId codec); + bool onCheckCodecProfile(const RtcCodecPlan &plan, CodecId codec); private: RtcCodecPlan::Ptr _rtsp_video_plan;