diff options
author | Mike Smith <msmith@xiph.org> | 2001-06-02 11:38:14 +0000 |
---|---|---|
committer | Mike Smith <msmith@xiph.org> | 2001-06-02 11:38:14 +0000 |
commit | 9bf73d9173753ecf46be67db8208ef4bd7991f6e (patch) | |
tree | 3f68ddbc8c0e895bac1a79883f879fb1bc04be06 | |
parent | 4c68e89c1d2f0e0cca63ec3e44a04320132d4b5a (diff) | |
download | libvorbis-git-9bf73d9173753ecf46be67db8208ef4bd7991f6e.tar.gz |
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.
svn path=/trunk/vorbis/; revision=1469
-rw-r--r-- | lib/vorbisfile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c index ab6d4c83..07e4ac26 100644 --- a/lib/vorbisfile.c +++ b/lib/vorbisfile.c @@ -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 @@ static int _ov_open1(void *f,OggVorbis_File *vf,char *initial, 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){ |