[xiph-commits] r17341 - trunk/rhea/src/org/xiph/ogg

mike at svn.xiph.org mike at svn.xiph.org
Tue Jul 20 14:30:14 PDT 2010


Author: mike
Date: 2010-07-20 14:30:14 -0700 (Tue, 20 Jul 2010)
New Revision: 17341

Modified:
   trunk/rhea/src/org/xiph/ogg/Page.java
   trunk/rhea/src/org/xiph/ogg/StreamState.java
   trunk/rhea/src/org/xiph/ogg/SyncState.java
Log:


Modified: trunk/rhea/src/org/xiph/ogg/Page.java
===================================================================
--- trunk/rhea/src/org/xiph/ogg/Page.java	2010-07-20 21:29:17 UTC (rev 17340)
+++ trunk/rhea/src/org/xiph/ogg/Page.java	2010-07-20 21:30:14 UTC (rev 17341)
@@ -125,11 +125,10 @@
 	
 	void checksum(){
 		int crc_reg = 0;
-	  
+		
 	 	crc_reg = getChecksum(crc_reg, header_base, header, header_len);
-	 	crc_reg = getChecksum(crc_reg, body_base, body, body_len);
-	 
-    	header_base[header + 22] = (byte)crc_reg;
+		crc_reg = getChecksum(crc_reg, body_base, body, body_len);
+		header_base[header + 22] = (byte)crc_reg;
     	header_base[header + 23] = (byte)(crc_reg >>> 8);
     	header_base[header + 24] = (byte)(crc_reg >>> 16);
     	header_base[header + 25] = (byte)(crc_reg >>> 24);

Modified: trunk/rhea/src/org/xiph/ogg/StreamState.java
===================================================================
--- trunk/rhea/src/org/xiph/ogg/StreamState.java	2010-07-20 21:29:17 UTC (rev 17340)
+++ trunk/rhea/src/org/xiph/ogg/StreamState.java	2010-07-20 21:30:14 UTC (rev 17341)
@@ -195,7 +195,6 @@
     int _serialno=og.serialno();
     int _pageno=og.pageno();
     int segments=header_base[header+26]&0xff;
-
     // clean up 'returned data'
     {
       int lr=lacing_returned;

Modified: trunk/rhea/src/org/xiph/ogg/SyncState.java
===================================================================
--- trunk/rhea/src/org/xiph/ogg/SyncState.java	2010-07-20 21:29:17 UTC (rev 17340)
+++ trunk/rhea/src/org/xiph/ogg/SyncState.java	2010-07-20 21:30:14 UTC (rev 17341)
@@ -137,10 +137,10 @@
         if(next==0)
           next=fill;
 
-        returned=next;
         return (-(next-page));
       }
-      _headerbytes=(data[page+26]&0xff)+27;
+		_headerbytes=(data[page+26]&0xff)+27;
+		
       if(bytes<_headerbytes)
         return (0); // not enough for header + seg table
 
@@ -154,7 +154,7 @@
 
     if(bodybytes+headerbytes>bytes)
       return (0);
-
+	  
     // The whole test page is buffered.  Verify the checksum
     //synchronized(chksum){
       // Grab the checksum bytes, set the header field to zero



More information about the commits mailing list