search for: _seek_helper

Displaying 5 results from an estimated 5 matches for "_seek_helper".

2001 Aug 30
1
Problems with vorbisfile and files smaller than CHUNKSIZE
...problems in vorbisfile.c relating to small files, such as the following 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_help...
2002 Nov 12
2
Vorbisfile: Small Files broken in 1.0?
...at's just a silent wav file. It compresses down to barely more than the header, so it's _really_ small. When I try to play it, it goes into an infinite loop in vorbisfile.c, line 159. In RC3, that code was: while(offset==-1){ begin-=CHUNKSIZE; if(begin<0) begin=0; _seek_helper(vf,begin); while(vf->offset<begin+CHUNKSIZE){ ret=_get_next_page(vf,og,begin+CHUNKSIZE-vf->offset); if(ret==OV_EREAD)return(OV_EREAD); if(ret<0){ break; }else{ offset=ret; } } } In 1.0, it changed to: end = begin; while(offse...
2004 Sep 06
1
Fixing libvorbisfile to handle largefiles
...+ }else{ + /* shouldn't happen unless someone writes a broken callback */ + return; + } +} + /* The read/seek functions track absolute position within the stream */ /* from the head of the stream, get the next page. boundary specifies Let me comment here: This is a duplicate of _seek_helper, and I'm not sure it's correct. _seek_helper is declared static (which I also changed for my convenience to match the above), and is not available to be used elsewhere. However, in the process of building `ogg123', I found that I needed to replace references to fseek()/ftell() with som...
2002 Mar 27
0
CVS libvorbisfile
...oop): tatic ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){ ogg_int64_t begin=vf->offset; ogg_int64_t end=begin; ogg_int64_t ret; ogg_int64_t offset=-1; >> while(offset==-1){ >> begin-=CHUNKSIZE; >> if(begin<0) >> begin=0; >> _seek_helper(vf,begin); >> while(vf->offset<end){ ret=_get_next_page(vf,og,end-vf->offset); if(ret==OV_EREAD)return(OV_EREAD); if(ret<0){ break; }else{ offset=ret; >> } } } [...] begin = 0, end = 0 Anybody has an idea here...
2004 May 23
4
Various Ogg Vorbis largefile notes and/or patches
Greetings one and all; I'm not subscribed to this list so I'm first sending this message to verify that mails from me make it through, and then later I'll send the juicy messages with patches. Also, the address I'm using is IPv6-only and doesn't often work, so drop me from any replies and I'll catch the archives, or drop only the hostname part to get an IPv4 address that