Modified: freeswitch/trunk/src/switch_rtp.c (16099 => 16100)
--- freeswitch/trunk/src/switch_rtp.c 2009-12-30 21:57:54 UTC (rev 16099)
+++ freeswitch/trunk/src/switch_rtp.c 2009-12-30 23:10:38 UTC (rev 16100)
@@ -1879,8 +1879,16 @@
}
poll_loop = 1;
- rtp_session->missed_count += (poll_sec * 1000 ) / (rtp_session->ms_per_packet ? rtp_session->ms_per_packet : 20 / 1000);
+ rtp_session->missed_count += (poll_sec * 1000 ) / (rtp_session->ms_per_packet ? rtp_session->ms_per_packet / 1000 : 20 );
bytes = 0;
+
+ if (rtp_session->max_missed_packets) {
+ if (rtp_session->missed_count >= rtp_session->max_missed_packets) {
+ ret = -2;
+ goto end;
+ }
+ }
+
if (rtp_session->dtmf_data.out_digit_dur == 0 || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
return_cng_frame();
}