不支持的协议直接抛异常, 防止非法推拉流:#1725

This commit is contained in:
ziyue
2022-07-29 17:31:55 +08:00
parent 54f400a6e9
commit 24db0454a8
2 changed files with 4 additions and 5 deletions

View File

@@ -56,10 +56,9 @@ PlayerBase::Ptr PlayerBase::createPlayer(const EventPoller::Ptr &poller, const s
} else if (end_with(url, ".ts") || end_with(url_in, ".ts")) {
return PlayerBase::Ptr(new TsPlayerImp(poller), releasePlayer);
}
return PlayerBase::Ptr(new TsPlayerImp(poller), releasePlayer);
}
return PlayerBase::Ptr(new RtspPlayerImp(poller), releasePlayer);
throw std::invalid_argument("not supported play schema:" + url_in);
}
PlayerBase::PlayerBase() {