]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't send cn packet until you have sent some actual audio
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Dec 2012 21:11:44 +0000 (15:11 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Dec 2012 21:11:49 +0000 (15:11 -0600)
src/switch_rtp.c

index 951edb70b79fe17d98ebeb6cd908185cff0333a8..f1640989e64d39986d71ab1ad2ba917c2e50f543 100644 (file)
@@ -972,7 +972,7 @@ static int check_srtp_and_ice(switch_rtp_t *rtp_session)
        int ret = 0;
 
 
-               if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) &&
+               if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) && rtp_session->send_msg.header.ts &&
                        rtp_session->timer.samplecount >= (rtp_session->last_write_samplecount + (rtp_session->samples_per_interval * 50))) {
                        uint8_t data[10] = { 0 };
                        switch_frame_flag_t frame_flags = SFF_NONE;