Don't update to a single codec not in our offer
git-svn-id: http://yate.null.ro/svn/yate/trunk@1878 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
20b2efae8a
commit
69bec18f47
|
@ -958,10 +958,15 @@ bool NetMedia::update(const char* formats, int rport, int lport)
|
|||
bool chg = false;
|
||||
String tmp(formats);
|
||||
if (m_formats != tmp) {
|
||||
chg = true;
|
||||
m_formats = tmp;
|
||||
int q = m_formats.find(',');
|
||||
m_format = m_formats.substr(0,q);
|
||||
if ((tmp.find(',') < 0) && m_formats && m_formats.find(tmp) < 0)
|
||||
Debug(&plugin,DebugInfo,"Not changing to '%s' from '%s' [%p]",
|
||||
formats,m_formats.c_str(),this);
|
||||
else {
|
||||
chg = true;
|
||||
m_formats = tmp;
|
||||
int q = m_formats.find(',');
|
||||
m_format = m_formats.substr(0,q);
|
||||
}
|
||||
}
|
||||
if (rport >= 0) {
|
||||
tmp = rport;
|
||||
|
|
Loading…
Reference in New Issue