From a82f3837131a914ef681b129ffe3eee129e1690c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 28 Apr 2009 15:32:37 +0000 Subject: [PATCH] prevent div by zero git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13179 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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 6deb482c99..2bf5465646 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1500,7 +1500,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ } poll_loop = 1; - rtp_session->missed_count += (poll_sec * 1000 ) / (rtp_session->ms_per_packet / 1000); + rtp_session->missed_count += (poll_sec * 1000 ) / (rtp_session->ms_per_packet ? rtp_session->ms_per_packet : 20 / 1000); bytes = 0; }