[svn-commits] twilson: branch 1.6.2 r200172 - /branches/1.6.2/main/rtp.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jun 11 16:35:40 CDT 2009
Author: twilson
Date: Thu Jun 11 16:35:37 2009
New Revision: 200172
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=200172
Log:
Don't access rtp->rtcp->* if rtp->rtcp is null
Modified:
branches/1.6.2/main/rtp.c
Modified: branches/1.6.2/main/rtp.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/rtp.c?view=diff&rev=200172&r1=200171&r2=200172
==============================================================================
--- branches/1.6.2/main/rtp.c (original)
+++ branches/1.6.2/main/rtp.c Thu Jun 11 16:35:37 2009
@@ -1488,18 +1488,21 @@
if (d<0)
d=-d;
rtp->rxjitter += (1./16.) * (d - rtp->rxjitter);
- if (rtp->rtcp && rtp->rxjitter > rtp->rtcp->maxrxjitter)
- rtp->rtcp->maxrxjitter = rtp->rxjitter;
- if (rtp->rtcp->rxjitter_count == 1)
- rtp->rtcp->minrxjitter = rtp->rxjitter;
- if (rtp->rtcp && rtp->rxjitter < rtp->rtcp->minrxjitter)
- rtp->rtcp->minrxjitter = rtp->rxjitter;
-
- normdev_rxjitter_current = normdev_compute(rtp->rtcp->normdev_rxjitter,rtp->rxjitter,rtp->rtcp->rxjitter_count);
- rtp->rtcp->stdev_rxjitter = stddev_compute(rtp->rtcp->stdev_rxjitter,rtp->rxjitter,rtp->rtcp->normdev_rxjitter,normdev_rxjitter_current,rtp->rtcp->rxjitter_count);
-
- rtp->rtcp->normdev_rxjitter = normdev_rxjitter_current;
- rtp->rtcp->rxjitter_count++;
+
+ if (rtp->rtcp) {
+ if (rtp->rxjitter > rtp->rtcp->maxrxjitter)
+ rtp->rtcp->maxrxjitter = rtp->rxjitter;
+ if (rtp->rtcp->rxjitter_count == 1)
+ rtp->rtcp->minrxjitter = rtp->rxjitter;
+ if (rtp->rxjitter < rtp->rtcp->minrxjitter)
+ rtp->rtcp->minrxjitter = rtp->rxjitter;
+
+ normdev_rxjitter_current = normdev_compute(rtp->rtcp->normdev_rxjitter,rtp->rxjitter,rtp->rtcp->rxjitter_count);
+ rtp->rtcp->stdev_rxjitter = stddev_compute(rtp->rtcp->stdev_rxjitter,rtp->rxjitter,rtp->rtcp->normdev_rxjitter,normdev_rxjitter_current,rtp->rtcp->rxjitter_count);
+
+ rtp->rtcp->normdev_rxjitter = normdev_rxjitter_current;
+ rtp->rtcp->rxjitter_count++;
+ }
}
/*! \brief Perform a Packet2Packet RTP write */
More information about the svn-commits
mailing list