[xiph-commits] r11418 - trunk/xiph-rtp

lu_zero at svn.xiph.org lu_zero at svn.xiph.org
Tue May 23 01:24:40 PDT 2006


Author: lu_zero
Date: 2006-05-23 01:24:37 -0700 (Tue, 23 May 2006)
New Revision: 11418

Modified:
   trunk/xiph-rtp/xiph_rtp.c
Log:
Better timestamp handling, sleeptime will follow, thanks to wei for pointing out the issue

Modified: trunk/xiph-rtp/xiph_rtp.c
===================================================================
--- trunk/xiph-rtp/xiph_rtp.c	2006-05-22 01:58:55 UTC (rev 11417)
+++ trunk/xiph-rtp/xiph_rtp.c	2006-05-23 08:24:37 UTC (rev 11418)
@@ -228,7 +228,8 @@
 	}
 }
 
-static void stack_packet(xiph_rtp_t *xr, unsigned char* vorbdata, int length)
+static void stack_packet(xiph_rtp_t *xr, unsigned char* vorbdata, int length, 
+                         long timestamp)
 {
 	framestack_t *fs = &xr->fs;
 	
@@ -241,6 +242,7 @@
 	
 	fs->stackcount++;
 	fs->stacksize += length;
+	xr->headers.timestamp += timestamp;
 
 }
 
@@ -268,7 +270,7 @@
 		if (length + fs->stacksize <= max_payload
 				&& fs->stackcount < 15) 
 		{
-			stack_packet(xr, vorbdata, length);
+			stack_packet(xr, vorbdata, length, timestamp);
 		}
 
 		else if (length + fs->stacksize > max_payload
@@ -277,7 +279,7 @@
 			flush_stack(xr, timestamp, sleeptime);
 		
 			if (length <= max_payload)
-				stack_packet(xr,vorbdata,length);
+				stack_packet(xr, vorbdata, length, timestamp);
 		}
 		if (last)
 			flush_stack(xr, timestamp, sleeptime);



More information about the commits mailing list