From: Mike Smith Date: Sat, 2 Jun 2001 11:38:14 +0000 (+0000) Subject: Don't reduce open state during ov_open(). X-Git-Tag: v1.3.3~993 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9bf73d9173753ecf46be67db8208ef4bd7991f6e;p=platform%2Fupstream%2Flibvorbis.git 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 --- 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){