Skip to content

Commit

Permalink
提升rtsp协议兼容性 (ZLMediaKit#4003)
Browse files Browse the repository at this point in the history
海康解码器播放rtsp流url带了?key=value参数,SETUP时会带着这些参数,导致获取trackid失败
  • Loading branch information
286897655 authored Nov 9, 2024
1 parent ef11c66 commit 8e823b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rtsp/RtspSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ int RtspSession::getTrackIndexByTrackType(TrackType type) {

int RtspSession::getTrackIndexByControlUrl(const string &control_url) {
for (size_t i = 0; i < _sdp_track.size(); ++i) {
if (control_url == _sdp_track[i]->getControlUrl(_content_base)) {
if (control_url.find(_sdp_track[i]->getControlUrl(_content_base)) == 0) {
return i;
}
}
Expand Down

0 comments on commit 8e823b3

Please sign in to comment.