mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
rtsp播放器支持302跳转
This commit is contained in:
parent
4ab1d4ca44
commit
066e3217ea
@ -201,6 +201,14 @@ void RtspPlayer::handleResDESCRIBE(const Parser& parser) {
|
||||
sendDescribe();
|
||||
return;
|
||||
}
|
||||
if(parser.Url() == "302"){
|
||||
auto newUrl = parser["Location"];
|
||||
if(newUrl.empty()){
|
||||
throw std::runtime_error("未找到Location字段(跳转url)");
|
||||
}
|
||||
play(newUrl.data());
|
||||
return;
|
||||
}
|
||||
if (parser.Url() != "200") {
|
||||
throw std::runtime_error(
|
||||
StrPrinter << "DESCRIBE:" << parser.Url() << " " << parser.Tail() << endl);
|
||||
|
Loading…
Reference in New Issue
Block a user