[vorbis] ov_clear(&vorbis) segfaults?

Alexander Markley alex at milent.com
Sun Sep 14 11:26:37 PDT 2003



Hello all. I'm new to this list. I'm also new to coding with libvorbis 
and things, so please bear with me. :)

I've been having trouble with libvorbisfile.

My use of it is fairly simple, but when I try to ov_clear the vorbis 
file, it segfaults.

I can attach or otherwise make availible some demo source code, but for 
now I'll just pull out relevant lines:

//BEGIN PSEUDO CODE
OggVorbis_File vorbis;
vorbis_info *info;

if(ov_open(infile, &vorbis, NULL, 0) != 0) error();
if((info = ov_info(&vorbis, -1)) == NULL) error();
if((availible_chunks[tint]->len = ov_pcm_total(&vorbis, -1)) == 
OV_EINVAL) error();
while((tulong = ov_read(&vorbis, tuint8p, 4096, endian, 2, 1, 
&bitstream)) != 0) dothings_withdata(); //While not end.
if(ov_clear(&vorbis) != 0) error(); //SEGFAULT!
//END PSEUDO CODE

Now, I realize that I haven't given much in the line of an example here, 
but I do have a full, compiling, smallest test-case availible to anybody 
who's interested.

Also, and this is probably of the most interest, that code extracts 
valid PCM data, and my SDL mixing/playing code plays it fine.

Any ideas?
tia
--Alex

--- >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 'vorbis-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 Vorbis mailing list