Don't use hard timestamps for non-voice frames.
authorMark Spencer <markster@digium.com>
Fri, 19 Mar 2004 08:12:04 +0000 (08:12 +0000)
committerMark Spencer <markster@digium.com>
Fri, 19 Mar 2004 08:12:04 +0000 (08:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2471 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index cf92a1c..ba3c557 100755 (executable)
@@ -2659,7 +2659,7 @@ static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned in
        lastsent = pvt->lastsent;
 
        /* Calculate actual timestamp */
-       fts = calc_timestamp(pvt, ts, &f->delivery);
+       fts = calc_timestamp(pvt, ts, (f->frametype == AST_FRAME_VOICE) ? &f->delivery : NULL);
 
        if ((pvt->trunk || ((fts & 0xFFFF0000L) == (lastsent & 0xFFFF0000L)))
                /* High two bits are the same on timestamp, or sending on a trunk */ &&