search for: _open_seekable2

Displaying 1 result from an estimated 1 matches for "_open_seekable2".

Did you mean: _open_seekable
2001 Aug 30
1
Problems with vorbisfile and files smaller than CHUNKSIZE
...code fragment at the start of the _get_prev_page() function: tatic long _get_prev_page(OggVorbis_File *vf,ogg_page *og){ long begin=vf->offset; long ret; int offset=-1; while(offset==-1){ begin-=CHUNKSIZE; _seek_helper(vf,begin); ... Initially, _get_prev_page() is called from _open_seekable2(), after seeking to the end of the input file. So if the file is small enough, vf->offset can end up smaller than CHUNKSIZE, and the variable 'begin' will become negative just after the while(), causing _seek_helper() to fail. However, its return value is never checked, so the problem is...