Commit 272d1a8b by xiongziliang

兼容一些rtmp推流器: #692

parent aa45590c
......@@ -87,6 +87,12 @@ void RtmpSession::onCmd_connect(AMFDecoder &dec) {
if(_tc_url.empty()){
//defaultVhost:默认vhost
_tc_url = string(RTMP_SCHEMA) + "://" + DEFAULT_VHOST + "/" + _media_info._app;
} else {
auto pos = _tc_url.rfind('?');
if (pos != string::npos) {
//tc_url 中可能包含?以及参数,参见issue: #692
_tc_url = _tc_url.substr(0, pos);
}
}
bool ok = true; //(app == APP_NAME);
AMFValue version(AMF_OBJECT);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论