MODENDP-206 Ignore ptime when missing instead of using @0i - thanks stangor

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13231 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-05-04 22:53:41 +00:00
parent ad0aaa6dd5
commit b06465a3b8

View File

@ -2487,7 +2487,11 @@ void sofia_glue_set_r_sdp_codec_string(switch_channel_t *channel,const char *cod
} }
if (match) { if (match) {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (int) map->rm_rate, ptime); if(ptime > 0) {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (unsigned int) map->rm_rate, ptime);
} else {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh", imp->iananame, (unsigned int) map->rm_rate);
}
already_did[imp->ianacode] = 1; already_did[imp->ianacode] = 1;
break; break;
} }
@ -2524,7 +2528,11 @@ void sofia_glue_set_r_sdp_codec_string(switch_channel_t *channel,const char *cod
} }
if (match) { if (match) {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (int) map->rm_rate, ptime); if(ptime > 0) {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (unsigned int) map->rm_rate, ptime);
} else {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh", imp->iananame, (unsigned int) map->rm_rate);
}
already_did[imp->ianacode] = 1; already_did[imp->ianacode] = 1;
break; break;
} }