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

Monty xiphmont at xiph.org
Fri Oct 11 01:22:18 PDT 2002



xiphmont    02/10/11 04:22:18

  Modified:    lib      floor1.c vorbisfile.c
  Log:
  Fix ov_time_tell bug for non-seekable streams

Revision  Changes    Path
1.25      +5 -1      vorbis/lib/floor1.c

Index: floor1.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/floor1.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- floor1.c	18 Jul 2002 01:41:59 -0000	1.24
+++ floor1.c	11 Oct 2002 08:22:18 -0000	1.25
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: floor backend 1 implementation
- last mod: $Id: floor1.c,v 1.24 2002/07/18 01:41:59 xiphmont Exp $
+ last mod: $Id: floor1.c,v 1.25 2002/10/11 08:22:18 xiphmont Exp $
 
  ********************************************************************/
 
@@ -663,6 +663,10 @@
           int ly=post_Y(fit_valueA,fit_valueB,ln);
           int hy=post_Y(fit_valueA,fit_valueB,hn);
           
+	  if(ly==-1 || hy==-1){
+	    exit(1);
+	  }
+
           if(inspect_error(lx,hx,ly,hy,logmask,logmdct,info)){
             /* outside error bounds/begin search area.  Split it. */
             int ly0=-200;

<p><p>1.63      +2 -4      vorbis/lib/vorbisfile.c

Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisfile.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- vorbisfile.c	6 Jul 2002 04:20:03 -0000	1.62
+++ vorbisfile.c	11 Oct 2002 08:22:18 -0000	1.63
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.62 2002/07/06 04:20:03 msmith Exp $
+ last mod: $Id: vorbisfile.c,v 1.63 2002/10/11 08:22:18 xiphmont Exp $
 
  ********************************************************************/
 
@@ -1341,9 +1341,7 @@
 
 /* return time offset (seconds) of next PCM sample to be read */
 double ov_time_tell(OggVorbis_File *vf){
-  /* translate time to PCM position and call ov_pcm_seek */
-
-  int link=-1;
+  int link=0;
   ogg_int64_t pcm_total=0;
   double time_total=0.f;
   

<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