FWIW, the fix below applies to cvs (not Stable). The stable version of this
is very different. Looks like Stable hasn't been updated for some time.
> static unsigned int calc_txstamp(struct ast_rtp *rtp, struct timeval
> *delivery)
> {
> struct timeval now;
> unsigned int ms;
> if (!rtp->txcore.tv_sec && !rtp->txcore.tv_usec) {
> gettimeofday(&rtp->txcore, NULL);
> rtp->txcore.tv_usec -= rtp->txcore.tv_usec % 20000;
> }
> if (delivery && (delivery->tv_sec || delivery->tv_usec)) {
> /* Use previous txcore */
> => ms = (delivery->tv_sec - rtp->txcore.tv_sec) * 1000;
> ms += ((delivery->tv_usec - rtp->txcore.tv_usec) + 500) /
> 1000;
> rtp->txcore.tv_sec = delivery->tv_sec;
> rtp->txcore.tv_usec = delivery->tv_usec;
> } else {
> gettimeofday(&now, NULL);
> ms = (now.tv_sec - rtp->txcore.tv_sec) * 1000;
> => ms += ((now.tv_usec - rtp->txcore.tv_usec) + 500 ) / 1000;
> /* Use what we just got for next time */
> rtp->txcore.tv_sec = now.tv_sec;
> rtp->txcore.tv_usec = now.tv_usec;
> }
> return ms;
> }
>
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users