From 0e683253198c99b44035b9762b090ca8a480055a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 25 Jan 2014 03:51:27 +0500 Subject: [PATCH] only send cng when its setup --- src/switch_rtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 4f36819ff9..48b723a7b5 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1587,7 +1587,7 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session) rtp_session->fir_countdown--; } - if (rtp_session->flags[SWITCH_RTP_FLAG_AUTO_CNG] && rtp_session->send_msg.header.ts && + if (rtp_session->flags[SWITCH_RTP_FLAG_AUTO_CNG] && rtp_session->send_msg.header.ts && rtp_session->cng_pt && rtp_session->timer.samplecount >= (rtp_session->last_write_samplecount + (rtp_session->samples_per_interval * 60))) { uint8_t data[10] = { 0 }; switch_frame_flag_t frame_flags = SFF_NONE;