[xiph-commits] r3003 - liboggz/trunk/src/liboggz

shans at svn.annodex.net shans at svn.annodex.net
Tue Jun 19 05:41:30 PDT 2007


Author: shans
Date: 2007-06-19 05:41:29 -0700 (Tue, 19 Jun 2007)
New Revision: 3003

Modified:
   liboggz/trunk/src/liboggz/oggz_seek.c
Log:
Reset last page granulepos of all streams on every raw seek



Modified: liboggz/trunk/src/liboggz/oggz_seek.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_seek.c	2007-06-19 11:14:17 UTC (rev 3002)
+++ liboggz/trunk/src/liboggz/oggz_seek.c	2007-06-19 12:41:29 UTC (rev 3003)
@@ -95,12 +95,21 @@
 /*
  * seeks and syncs
  */
+
+int
+oggz_seek_reset_stream(void *data) {
+  ((oggz_stream_t *)data)->last_granulepos = -1;
+  return 0;
+}
+
 static oggz_off_t
 oggz_seek_raw (OGGZ * oggz, oggz_off_t offset, int whence)
 {
   OggzReader * reader = &oggz->x.reader;
   oggz_off_t offset_at;
 
+  oggz_vector_foreach(oggz->streams, oggz_seek_reset_stream);
+  
   if (oggz_io_seek (oggz, offset, whence) == -1) {
     return -1;
   }



More information about the commits mailing list