[xiph-commits] r7835 - trunk/ogg/src

xiphmont at motherfish-iii.xiph.org xiphmont at motherfish-iii.xiph.org
Wed Sep 22 13:57:10 PDT 2004


Author: xiphmont
Date: 2004-09-22 13:57:09 -0700 (Wed, 22 Sep 2004)
New Revision: 7835

Modified:
   trunk/ogg/src/framing.c
Log:
Fix for Josh Coalson's long-packet sync continuation bug.  Passes all unit tests.



Modified: trunk/ogg/src/framing.c
===================================================================
--- trunk/ogg/src/framing.c	2004-09-22 19:47:42 UTC (rev 7834)
+++ trunk/ogg/src/framing.c	2004-09-22 20:57:09 UTC (rev 7835)
@@ -732,10 +732,13 @@
       os->lacing_vals[os->lacing_fill++]=0x400;
       os->lacing_packet++;
     }
+  }
 
-    /* are we a 'continued packet' page?  If so, we'll need to skip
-       some segments */
-    if(continued){
+  /* are we a 'continued packet' page?  If so, we may need to skip
+     some segments */
+  if(continued){
+    if(os->lacing_fill<1 || 
+       os->lacing_vals[os->lacing_fill-1]==0x400){
       bos=0;
       for(;segptr<segments;segptr++){
 	int val=header[27+segptr];
@@ -1257,6 +1260,7 @@
 	outptr+=og.body_len;
 	pageno++;
 	if(pageskip){
+	  bosflag=1;
 	  pageskip--;
 	  deptr+=og.body_len;
 	}



More information about the commits mailing list