forked from Mirrors/freeswitch
update contd
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4474 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
13c9b4779a
commit
70db8abf67
|
@ -2460,6 +2460,10 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
|
|||
if (!cng_pt && !strcasecmp(map->rm_encoding, "CN")) {
|
||||
cng_pt = tech_pvt->cng_pt = (switch_payload_t)map->rm_pt;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set comfort noise payload to %u\n", cng_pt);
|
||||
if (tech_pvt->rtp_session) {
|
||||
switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);
|
||||
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_AUTO_CNG);
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
|
|
|
@ -820,11 +820,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||
check = (uint8_t)(switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS);
|
||||
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) &&
|
||||
rtp_session->timer.samplecount >= (rtp_session->last_write_ts + (rtp_session->packet_size * 5))) {
|
||||
rtp_session->timer.samplecount >= (rtp_session->last_write_ts + (rtp_session->packet_size * 50))) {
|
||||
uint8_t data[2] = {0};
|
||||
switch_frame_flag_t flags = SFF_NONE;
|
||||
data[0] = 127;
|
||||
printf("WTF %u %u\n", rtp_session->timer.samplecount, (rtp_session->last_write_ts + (rtp_session->packet_size * 5)));
|
||||
rtp_session->last_write_ts = rtp_session->timer.samplecount;
|
||||
rtp_session->seq = ntohs(rtp_session->seq) + 1;
|
||||
rtp_session->seq = htons(rtp_session->seq);
|
||||
|
|
Loading…
Reference in New Issue