mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix TWCC enable bug
This commit is contained in:
parent
96dbd7bced
commit
98839d3d53
3 changed files with 32 additions and 2 deletions
|
@ -1583,6 +1583,16 @@ void SrsRtcTrackDescription::add_rtp_extension_desc(int id, std::string uri)
|
|||
extmaps_[id] = uri;
|
||||
}
|
||||
|
||||
void SrsRtcTrackDescription::del_rtp_extension_desc(std::string uri)
|
||||
{
|
||||
for(std::map<int, std::string>::iterator it = extmaps_.begin(); it != extmaps_.end(); ++it) {
|
||||
if(uri == it->second) {
|
||||
extmaps_.erase(it++);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SrsRtcTrackDescription::set_direction(std::string direction)
|
||||
{
|
||||
direction_ = direction;
|
||||
|
@ -1630,7 +1640,7 @@ void SrsRtcTrackDescription::set_mid(std::string mid)
|
|||
|
||||
int SrsRtcTrackDescription::get_rtp_extension_id(std::string uri)
|
||||
{
|
||||
for(std::map<int, std::string>::iterator it = extmaps_.begin(); it != extmaps_.end(); ++it) {
|
||||
for (std::map<int, std::string>::iterator it = extmaps_.begin(); it != extmaps_.end(); ++it) {
|
||||
if(uri == it->second) {
|
||||
return it->first;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue