Merged revisions 45452 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 18 Oct 2006 03:03:37 +0000 (03:03 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 18 Oct 2006 03:03:37 +0000 (03:03 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45452 | file | 2006-10-17 23:02:08 -0400 (Tue, 17 Oct 2006) | 2 lines

Don't segfault if you're using a channel driver that doesn't turn RTCP on

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45453 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 9c17b32..589584d 100644 (file)
@@ -1000,9 +1000,9 @@ static void calc_rxstamp(struct timeval *tv, struct ast_rtp *rtp, unsigned int t
        if (d<0)
                d=-d;
        rtp->rxjitter += (1./16.) * (d - rtp->rxjitter);
-       if (rtp->rxjitter > rtp->rtcp->maxrxjitter)
+       if (rtp->rtcp && rtp->rxjitter > rtp->rtcp->maxrxjitter)
                rtp->rtcp->maxrxjitter = rtp->rxjitter;
-       if (rtp->rxjitter < rtp->rtcp->minrxjitter)
+       if (rtp->rtcp && rtp->rxjitter < rtp->rtcp->minrxjitter)
                rtp->rtcp->minrxjitter = rtp->rxjitter;
 }