[xiph-commits] r9432 - experimental/giles/rogg

giles at motherfish-iii.xiph.org giles at motherfish-iii.xiph.org
Fri Jun 10 03:18:45 PDT 2005


Author: giles
Date: 2005-06-10 03:18:41 -0700 (Fri, 10 Jun 2005)
New Revision: 9432

Modified:
   experimental/giles/rogg/rogg_eosfix.c
Log:
Fix and infinite loop.


Modified: experimental/giles/rogg/rogg_eosfix.c
===================================================================
--- experimental/giles/rogg/rogg_eosfix.c	2005-06-10 09:56:58 UTC (rev 9431)
+++ experimental/giles/rogg/rogg_eosfix.c	2005-06-10 10:18:41 UTC (rev 9432)
@@ -82,6 +82,7 @@
 
   while(ref != NULL) {
     if (ref->serialno == page->serialno) return ref;
+    ref = ref->next;
   }
 
   return NULL;
@@ -94,6 +95,8 @@
 
   ref = streamref_get(head, page);
   if (ref == NULL) {
+	fprintf(stderr, "new logical stream serialno %08x\n", 
+		page->serialno);
 	ref = streamref_new(head, page);
 	newhead = 1;
   }
@@ -157,7 +160,7 @@
 	close(f);
 	continue;
     }
-    fprintf(stdout, "Dumping Ogg file '%s'\n", argv[i]);
+    fprintf(stdout, "Checking Ogg file '%s'\n", argv[i]);
     e = p + s.st_size;
     q = rogg_scan(p, s.st_size);
     refs = NULL;
@@ -177,19 +180,25 @@
 	  break;
 	}
 	rogg_parse_header(q, &header);
+#ifdef VERBOSE
 	print_header_info(stdout, &header);
+#endif
 #ifdef STRIP_EOS
 	if (header.eos) {
 	  /* unset any eos flags */
 	  q[ROGG_OFFSET_FLAGS] &= ~0x04;
 	  rogg_update_crc(q);
+	  fprintf(stderr, "Removed eos flag on stream %08x\n", 
+		header.serialno);
         }
 #endif
 	refs = streamref_update(refs, &header);
 	q += header.length;
       }
     }
+#ifndef STRIP_EOS
     streamref_seteos(refs);
+#endif
     streamref_free(refs);
     munmap(p, s.st_size);
     close(f);



More information about the commits mailing list