mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-12-02 00:12:33 +08:00
rtsp播放器支持302跳转
This commit is contained in:
parent
4ab1d4ca44
commit
066e3217ea
@ -201,6 +201,14 @@ void RtspPlayer::handleResDESCRIBE(const Parser& parser) {
|
|||||||
sendDescribe();
|
sendDescribe();
|
||||||
return;
|
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") {
|
if (parser.Url() != "200") {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
StrPrinter << "DESCRIBE:" << parser.Url() << " " << parser.Tail() << endl);
|
StrPrinter << "DESCRIBE:" << parser.Url() << " " << parser.Tail() << endl);
|
||||||
|
Loading…
Reference in New Issue
Block a user