]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't segfault if you're using a channel driver that doesn't turn RTCP on
authorJoshua Colp <jcolp@digium.com>
Wed, 18 Oct 2006 03:02:08 +0000 (03:02 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 18 Oct 2006 03:02:08 +0000 (03:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@45452 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 23c4bbe46bdbafa08c2095c50b855424d181aca5..6be71d3e60587891f24e83083b3484343e56b61f 100644 (file)
@@ -950,9 +950,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;
 }