[xiph-cvs] cvs commit: vorbis/lib vorbisfile.c

Monty xiphmont at xiph.org
Tue Mar 19 09:50:00 PST 2002



xiphmont    02/03/19 09:50:00

  Modified:    lib      vorbisfile.c
  Log:
  Fix _fecth_and_process_packet for non-seekable streams

Revision  Changes    Path
1.60      +4 -3      vorbis/lib/vorbisfile.c

Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisfile.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- vorbisfile.c	2002/03/07 03:41:03	1.59
+++ vorbisfile.c	2002/03/19 17:49:59	1.60
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.59 2002/03/07 03:41:03 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.60 2002/03/19 17:49:59 xiphmont Exp $
 
  ********************************************************************/
 
@@ -515,8 +515,9 @@
                  So, we need a previous granulepos from an in-sequence page
                  to have a reference point.  Thus the !op_ptr->e_o_s clause
                  above */
-	      
-	      granulepos-=vf->pcmlengths[link*2];
+
+	      if(vf->seekable && link>0)
+		granulepos-=vf->pcmlengths[link*2];
               if(granulepos<0)granulepos=0; /* actually, this
                                                shouldn't be possible
                                                here unless the stream

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list