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

Michael Smith msmith at xiph.org
Sat Jun 2 04:38:15 PDT 2001



msmith      01/06/02 04:38:15

  Modified:    lib      vorbisfile.c
  Log:
  Don't reduce open state during ov_open().
  Fixes non-seekable vorbisfile (i.e. streaming).
  
  Monty - I'm not certain this is completely correct in all cases - please
  look it over. However, it doesn't break any normal major uses and does make
  streaming playback work.

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

Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisfile.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- vorbisfile.c	2001/05/27 20:08:07	1.47
+++ vorbisfile.c	2001/06/02 11:38:14	1.48
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.47 2001/05/27 20:08:07 giles Exp $
+ last mod: $Id: vorbisfile.c,v 1.48 2001/06/02 11:38:14 msmith Exp $
 
  ********************************************************************/
 
@@ -590,13 +590,14 @@
   if((ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,NULL))<0){
     vf->datasource=NULL;
     ov_clear(vf);
-  }else
+  }else if(vf->ready_state < PARTOPEN)
     vf->ready_state=PARTOPEN;
   return(ret);
 }
 
 static int _ov_open2(OggVorbis_File *vf){
-  vf->ready_state=OPENED;
+  if(vf->ready_state < OPENED)
+    vf->ready_state=OPENED;
   if(vf->seekable){
     int ret=_open_seekable2(vf);
     if(ret){

--- >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