mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
webrtc extmap方向匹配失败时,不添加进sdp
This commit is contained in:
parent
b2bec61932
commit
e4cdc5f213
@ -1749,8 +1749,14 @@ RETRY:
|
|||||||
for (auto &ext : offer_media.extmap) {
|
for (auto &ext : offer_media.extmap) {
|
||||||
auto it = configure.extmap.find(RtpExt::getExtType(ext.ext));
|
auto it = configure.extmap.find(RtpExt::getExtType(ext.ext));
|
||||||
if (it != configure.extmap.end()) {
|
if (it != configure.extmap.end()) {
|
||||||
|
auto new_dir = matchDirection(ext.direction, it->second);
|
||||||
|
switch (new_dir) {
|
||||||
|
case RtpDirection::invalid:
|
||||||
|
case RtpDirection::inactive: continue;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
answer_media.extmap.emplace_back(ext);
|
answer_media.extmap.emplace_back(ext);
|
||||||
answer_media.extmap.back().direction = matchDirection(ext.direction, it->second);
|
answer_media.extmap.back().direction = new_dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user