mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
修复rtsp 拉流 sdp中全局a:control:获取失败的bug
This commit is contained in:
parent
9317665058
commit
e8f8b48d38
@ -166,13 +166,13 @@ void SdpParser::load(const string &sdp) {
|
|||||||
string opt_val = line.substr(2);
|
string opt_val = line.substr(2);
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 't':
|
case 't':
|
||||||
if (_track_vec.empty())
|
if (_track_vec.size() == 1)
|
||||||
global_infos.emplace(opt, opt_val);
|
global_infos.emplace(opt, opt_val);
|
||||||
else
|
else
|
||||||
track->_t = opt_val;
|
track->_t = opt_val;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
if (_track_vec.empty())
|
if (_track_vec.size() == 1)
|
||||||
global_infos.emplace(opt, opt_val);
|
global_infos.emplace(opt, opt_val);
|
||||||
else
|
else
|
||||||
track->_b = opt_val;
|
track->_b = opt_val;
|
||||||
@ -195,12 +195,12 @@ void SdpParser::load(const string &sdp) {
|
|||||||
case 'a': {
|
case 'a': {
|
||||||
string attr = findSubString(opt_val.data(), nullptr, ":");
|
string attr = findSubString(opt_val.data(), nullptr, ":");
|
||||||
if (attr.empty()) {
|
if (attr.empty()) {
|
||||||
if (_track_vec.empty())
|
if (_track_vec.size() == 1)
|
||||||
global_infos.emplace(opt, opt_val);
|
global_infos.emplace(opt, opt_val);
|
||||||
else
|
else
|
||||||
track->_attr.emplace(opt_val, "");
|
track->_attr.emplace(opt_val, "");
|
||||||
} else {
|
} else {
|
||||||
if (_track_vec.empty())
|
if (_track_vec.size() == 1)
|
||||||
global_infos.emplace(opt, opt_val);
|
global_infos.emplace(opt, opt_val);
|
||||||
else
|
else
|
||||||
track->_attr.emplace(attr, findSubString(opt_val.data(), ":", nullptr));
|
track->_attr.emplace(attr, findSubString(opt_val.data(), ":", nullptr));
|
||||||
@ -208,7 +208,7 @@ void SdpParser::load(const string &sdp) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
if (_track_vec.empty()) {
|
if (_track_vec.size() == 1) {
|
||||||
global_infos.emplace(opt, opt_val);
|
global_infos.emplace(opt, opt_val);
|
||||||
} else {
|
} else {
|
||||||
track->_other[opt] = opt_val;
|
track->_other[opt] = opt_val;
|
||||||
|
Loading…
Reference in New Issue
Block a user