Fixed bug: don't add SDP media ptime parameter if ilbc is not offered.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5510 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
7f4b7821f2
commit
67c5b6a96a
|
@ -352,11 +352,7 @@ MimeSdpBody* SDPSession::createSDP(const char* addr, ObjList* mediaList)
|
|||
const String* s = static_cast<const String*>(f->get());
|
||||
if (s) {
|
||||
int mode = 0;
|
||||
if (*s == "ilbc20")
|
||||
ptime = mode = 20;
|
||||
else if (*s == "ilbc30")
|
||||
ptime = mode = 30;
|
||||
else if (*s == "g729b")
|
||||
if (*s == "g729b")
|
||||
continue;
|
||||
int payload = s->toInteger(SDPParser::s_payloads,-1);
|
||||
int defcode = payload;
|
||||
|
@ -429,6 +425,10 @@ MimeSdpBody* SDPSession::createSDP(const char* addr, ObjList* mediaList)
|
|||
defcode = payload;
|
||||
const char* map = lookup(defcode,SDPParser::s_rtpmap);
|
||||
if (map && m_parser->m_codecs.getBoolValue(*s,defcodecs && DataTranslator::canConvert(*s))) {
|
||||
if (*s == "ilbc20")
|
||||
ptime = mode = 20;
|
||||
else if (*s == "ilbc30")
|
||||
ptime = mode = 30;
|
||||
frm << " " << payload;
|
||||
String* temp = new String("rtpmap:");
|
||||
*temp << payload << " " << map;
|
||||
|
|
Loading…
Reference in New Issue