[xiph-cvs] cvs commit: vorbis/lib vorbisfile.c
Monty
xiphmont at xiph.org
Sun Mar 3 17:02:06 PST 2002
xiphmont 02/03/03 17:02:05
Modified: lib vorbisfile.c
Log:
Vorbisfile wasn't obeying documentation;
If an open() failed, but the file *was* Vorbis (eg, due to a
filesystem fault or buggy callback) vorbisfile was closing the passed
in file handle, contrary to docs. Fixed in this commit.
Revision Changes Path
1.58 +4 -13 vorbis/lib/vorbisfile.c
Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisfile.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- vorbisfile.c 2002/02/28 07:12:20 1.57
+++ vorbisfile.c 2002/03/04 01:02:04 1.58
@@ -11,7 +11,7 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.57 2002/02/28 07:12:20 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.58 2002/03/04 01:02:04 xiphmont Exp $
********************************************************************/
@@ -365,28 +365,19 @@
/* We get the offset for the last page of the physical bitstream.
Most OggVorbis files will contain a single logical bitstream */
end=_get_prev_page(vf,&og);
- if(end<0){
- ov_clear(vf);
- return(end);
- }
+ if(end<0)return(end);
/* more than one logical bitstream? */
if(ogg_page_serialno(&og)!=serialno){
/* Chained bitstream. Bisect-search each logical bitstream
section. Do so based on serial number only */
- if(_bisect_forward_serialno(vf,0,0,end+1,serialno,0)<0){
- ov_clear(vf);
- return(OV_EREAD);
- }
+ if(_bisect_forward_serialno(vf,0,0,end+1,serialno,0)<0)return(OV_EREAD);
}else{
/* Only one logical bitstream */
- if(_bisect_forward_serialno(vf,0,end,end+1,serialno,0)){
- ov_clear(vf);
- return(OV_EREAD);
- }
+ if(_bisect_forward_serialno(vf,0,end,end+1,serialno,0))return(OV_EREAD);
}
<p><p><p>--- >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