[vorbis] ov_clear(&vorbis) segfaults?

Michael Smith msmith at xiph.org
Sun Sep 14 19:06:37 PDT 2003



On Monday 15 September 2003 04:26, Alexander Markley wrote:

> //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

This code doesn't look obviously wrong. You've probably got some other error 
(maybe you're accidently overwriting some buffer somewhere, or corrupting 
some data structures, or maybe your application is linked incorrectly. There 
are many possible problems - you haven't given us much detail).

<p>Mike

--- >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