[Asterisk-cvs] asterisk rtp.c,1.69,1.70
markster at lists.digium.com
markster at lists.digium.com
Sun May 30 16:09:12 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv3754
Modified Files:
rtp.c
Log Message:
Minor RTP video fixes, be more careful about closing fd's in meetme (bug #1743)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- rtp.c 28 May 2004 00:52:45 -0000 1.69
+++ rtp.c 30 May 2004 20:24:48 -0000 1.70
@@ -544,6 +544,8 @@
rtp->lastividtimestamp = timestamp;
rtp->f.samples = timestamp - rtp->lastividtimestamp;
rtp->lastividtimestamp = timestamp;
+ rtp->f.delivery.tv_sec = 0;
+ rtp->f.delivery.tv_usec = 0;
if (mark)
rtp->f.subclass |= 0x1;
@@ -1043,12 +1045,14 @@
/* Re-calculate last TS */
rtp->lastts = rtp->lastts + ms * 90;
/* If it's close to our prediction, go for it */
- if (abs(rtp->lastts - pred) < 7200) {
- rtp->lastts = pred;
- rtp->lastovidtimestamp += f->samples;
- } else {
- ast_log(LOG_DEBUG, "Difference is %d, ms is %d\n", abs(rtp->lastts - pred), ms);
- rtp->lastovidtimestamp = rtp->lastts;
+ if (!f->delivery.tv_sec && !f->delivery.tv_usec) {
+ if (abs(rtp->lastts - pred) < 7200) {
+ rtp->lastts = pred;
+ rtp->lastovidtimestamp += f->samples;
+ } else {
+ ast_log(LOG_DEBUG, "Difference is %d, ms is %d (%d), pred/ts/samples %d/%d/%d\n", abs(rtp->lastts - pred), ms, ms * 90, rtp->lastts, pred, f->samples);
+ rtp->lastovidtimestamp = rtp->lastts;
+ }
}
}
/* Get a pointer to the header */
More information about the svn-commits
mailing list