FS-3545 --resolve no, that was not the intention, I missed a few more spots to hack in the exception for iLBC, (thanks for marring my code iLBC ppl) it should work as expected now even with the m_per_ptime on
This commit is contained in:
parent
aea22cd4b7
commit
83a78fbfa0
|
@ -201,7 +201,12 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||||
|
|
||||||
for (i = 0; i < tech_pvt->num_codecs; i++) {
|
for (i = 0; i < tech_pvt->num_codecs; i++) {
|
||||||
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
|
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
|
||||||
|
int this_ptime = (imp->microseconds_per_packet / 1000);
|
||||||
|
|
||||||
|
if (!strcasecmp(imp->iananame, "ilbc")) {
|
||||||
|
this_ptime = 20;
|
||||||
|
}
|
||||||
|
|
||||||
if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
|
if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -210,12 +215,12 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||||
if (!cur_ptime) {
|
if (!cur_ptime) {
|
||||||
#if 0
|
#if 0
|
||||||
if (ptime) {
|
if (ptime) {
|
||||||
if (ptime != imp->microseconds_per_packet / 1000) {
|
if (ptime != this_ptime) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
|
||||||
"Codec %s payload %d added to sdp wanting ptime %d but it's already %d (%s:%d:%d), disabling ptime.\n",
|
"Codec %s payload %d added to sdp wanting ptime %d but it's already %d (%s:%d:%d), disabling ptime.\n",
|
||||||
imp->iananame,
|
imp->iananame,
|
||||||
tech_pvt->ianacodes[i],
|
tech_pvt->ianacodes[i],
|
||||||
imp->microseconds_per_packet / 1000,
|
this_ptime,
|
||||||
ptime,
|
ptime,
|
||||||
tech_pvt->codecs[0]->iananame,
|
tech_pvt->codecs[0]->iananame,
|
||||||
tech_pvt->codecs[0]->ianacode,
|
tech_pvt->codecs[0]->ianacode,
|
||||||
|
@ -224,15 +229,15 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||||
noptime = 1;
|
noptime = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ptime = imp->microseconds_per_packet / 1000;
|
ptime = this_ptime;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (!ptime) {
|
if (!ptime) {
|
||||||
ptime = imp->microseconds_per_packet / 1000;
|
ptime = this_ptime;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if ((imp->microseconds_per_packet / 1000) != cur_ptime) {
|
if (this_ptime != cur_ptime) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,18 +271,23 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
|
||||||
for (i = 0; i < tech_pvt->num_codecs; i++) {
|
for (i = 0; i < tech_pvt->num_codecs; i++) {
|
||||||
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
|
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
|
||||||
char *fmtp = imp->fmtp;
|
char *fmtp = imp->fmtp;
|
||||||
|
int this_ptime = imp->microseconds_per_packet / 1000;
|
||||||
|
|
||||||
if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
|
if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(imp->iananame, "ilbc")) {
|
||||||
|
this_ptime = 20;
|
||||||
|
}
|
||||||
|
|
||||||
if (!noptime) {
|
if (!noptime) {
|
||||||
if (!cur_ptime) {
|
if (!cur_ptime) {
|
||||||
if (!ptime) {
|
if (!ptime) {
|
||||||
ptime = imp->microseconds_per_packet / 1000;
|
ptime = this_ptime;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((imp->microseconds_per_packet / 1000) != cur_ptime) {
|
if (this_ptime != cur_ptime) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue