Ignore:
Timestamp:
Apr 28, 2011 4:01:40 AM (13 years ago)
Author:
ming
Message:

Fixed #1243: ICE bug: If RTCP is not in use, the agent MUST signal that using b=RS:0 and b=RR:0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c

    r2957 r3547  
    175175static const pj_str_t STR_IP6           = { "IP6", 3 }; 
    176176static const pj_str_t STR_RTCP          = { "rtcp", 4 }; 
     177static const pj_str_t STR_BANDW_RR      = { "RR", 2 }; 
     178static const pj_str_t STR_BANDW_RS      = { "RS", 2 }; 
    177179 
    178180enum { 
     
    602604        if (attr) 
    603605            pjmedia_sdp_attr_remove(&m->attr_count, m->attr, attr); 
     606        /* If RTCP is not in use, we MUST send b=RS:0 and b=RR:0. */ 
     607        pj_assert(m->bandw_count + 2 <= PJ_ARRAY_SIZE(m->bandw)); 
     608        if (m->bandw_count + 2 <= PJ_ARRAY_SIZE(m->bandw)) { 
     609            m->bandw[m->bandw_count] = PJ_POOL_ZALLOC_T(sdp_pool, 
     610                                                        pjmedia_sdp_bandw); 
     611            pj_memcpy(&m->bandw[m->bandw_count]->modifier, &STR_BANDW_RS, 
     612                      sizeof(pj_str_t)); 
     613            m->bandw_count++; 
     614            m->bandw[m->bandw_count] = PJ_POOL_ZALLOC_T(sdp_pool, 
     615                                                        pjmedia_sdp_bandw); 
     616            pj_memcpy(&m->bandw[m->bandw_count]->modifier, &STR_BANDW_RR, 
     617                      sizeof(pj_str_t)); 
     618            m->bandw_count++; 
     619        } 
    604620    } 
    605621     
Note: See TracChangeset for help on using the changeset viewer.