/* Use previous txcore if available */
t = (delivery && !ast_tvzero(*delivery)) ? *delivery : ast_tvnow();
ms = ast_tvdiff_ms(t, rtp->txcore);
+ if (ms < 0)
+ ms = 0;
/* Use what we just got for next time */
rtp->txcore = t;
return (unsigned int) ms;
char iabuf[INET_ADDRSTRLEN];
int hdrlen = 12;
int res;
- int ms;
+ unsigned int ms;
int pred;
int mark = 0;
ms = calc_txstamp(rtp, &f->delivery);
/* Default prediction */
if (f->subclass < AST_FORMAT_MAX_AUDIO) {
- pred = rtp->lastts + f->samples;
+ pred = rtp->lastts + f->samples;
/* Re-calculate last TS */
rtp->lastts = rtp->lastts + ms * 8;