mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
1、修复#125
2、修复非法rtsp url导致异常的问题
This commit is contained in:
parent
36a3f4225c
commit
1b6e61c413
@ -1 +1 @@
|
||||
Subproject commit 0ac7b3b1dc9817de1b1bb8644e2799ca0e4e9472
|
||||
Subproject commit 442fb18d2c13de4d5ac005c6d286e3e2b73309eb
|
@ -122,7 +122,7 @@ void RtspPlayer::play(bool isSSL,const string &strUrl, const string &strUser, co
|
||||
_eType = eType;
|
||||
|
||||
auto ip = FindField(strUrl.data(), "://", "/");
|
||||
if (!ip.size()) {
|
||||
if (ip.empty()) {
|
||||
ip = split(FindField(strUrl.data(), "://", NULL),"?")[0];
|
||||
}
|
||||
auto port = atoi(FindField(ip.data(), ":", NULL).data());
|
||||
@ -134,6 +134,11 @@ void RtspPlayer::play(bool isSSL,const string &strUrl, const string &strUser, co
|
||||
ip = FindField(ip.data(), NULL, ":");
|
||||
}
|
||||
|
||||
if(ip.empty()){
|
||||
onPlayResult_l(SockException(Err_other,StrPrinter << "illegal rtsp url:" << strUrl));
|
||||
return;
|
||||
}
|
||||
|
||||
_strUrl = strUrl;
|
||||
|
||||
weak_ptr<RtspPlayer> weakSelf = dynamic_pointer_cast<RtspPlayer>(shared_from_this());
|
||||
|
Loading…
Reference in New Issue
Block a user