From 9bf73d9173753ecf46be67db8208ef4bd7991f6e Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Sat, 2 Jun 2001 11:38:14 +0000 Subject: [PATCH] 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 --- lib/vorbisfile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c index ab6d4c8..07e4ac2 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){ -- 2.7.4