most recent vorbisfile state machine fix ebcause I thought it didn't
affect non-seekable. I was wrong, and the chnage broke things.
This fixes non-seekable input and I actually ran all the basic tests
(streaming, seekable, seeking, crosslapping and full chain tests)
before this commit.
Monty
svn path=/trunk/vorbis/; revision=5343
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.74 2003/09/12 18:30:16 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.75 2003/09/16 20:28:14 xiphmont Exp $
********************************************************************/
}
static int _ov_open2(OggVorbis_File *vf){
- if(vf->ready_state < OPENED)
- vf->ready_state=OPENED;
+ if(vf->ready_state != PARTOPEN) return OV_EINVAL;
+ vf->ready_state=OPENED;
if(vf->seekable){
int ret=_open_seekable2(vf);
if(ret){
ov_clear(vf);
}
return(ret);
- }
+ }else
+ vf->ready_state=STREAMSET;
+
return 0;
}