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

shans at svn.annodex.net shans at svn.annodex.net
Sun Nov 25 19:55:30 PST 2007


Author: shans
Date: 2007-11-25 19:55:29 -0800 (Sun, 25 Nov 2007)
New Revision: 3278

Modified:
   liboggz/trunk/src/liboggz/oggz_auto.c
   liboggz/trunk/src/liboggz/oggz_read.c
Log:
Some minor adjustments to work around Yet More problems with ogg 
granulepos values.


Modified: liboggz/trunk/src/liboggz/oggz_auto.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_auto.c	2007-11-19 00:15:46 UTC (rev 3277)
+++ liboggz/trunk/src/liboggz/oggz_auto.c	2007-11-26 03:55:29 UTC (rev 3278)
@@ -687,6 +687,8 @@
 
   info = (auto_calc_vorbis_info_t *)stream->calculate_data;
 
+  return -1;
+
   { 
     /*
      * we're in a data packet!  First we need to get the mode of the packet,

Modified: liboggz/trunk/src/liboggz/oggz_read.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_read.c	2007-11-19 00:15:46 UTC (rev 3277)
+++ liboggz/trunk/src/liboggz/oggz_read.c	2007-11-26 03:55:29 UTC (rev 3278)
@@ -419,6 +419,11 @@
           if (oggz->flags & OGGZ_AUTO) {
             reader->current_granulepos = 
               oggz_auto_calculate_granulepos (content, granulepos, stream, op); 
+            /* make sure that we accept any "real" gaps in the granulepos
+             */
+            if (granulepos != -1 && reader->current_granulepos < granulepos) {
+              reader->current_granulepos = granulepos;
+            }
           } else {
             reader->current_granulepos = granulepos;
           }



More information about the commits mailing list