兼容一些rtmp推流器: #692

This commit is contained in:
xiongziliang 2021-01-23 10:06:38 +08:00
parent aa45590c13
commit 272d1a8bd9

View File

@ -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);