[vorbis] ov_open/ov_test weirdness

Monty xiphmont at xiph.org
Mon Dec 9 18:34:00 PST 2002



On Mon, Dec 09, 2002 at 06:55:01AM -0700, Thomas Fjellstrom wrote:
> Hi,
> 
> I've been playing with a little player, and it seems I can't ov_open a file 
> twice?

I apologize for the incompleteness of the main doc on the following point:

Like with ov_open(), if ov_test() succeeds, it takes complete ownership
of the passed in FILE *.  Do not fclose() it later as you do below.
Your trouble is most likely a heap corruption in stdio.

Any successful lib call that takes a FILE * takes ownership of that
FILE *; the close is carried out in the ov_clear().

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