[vorbis-dev] Borland modification

Monty xiphmont at xiph.org
Tue Aug 29 16:08:04 PDT 2000



> The problem is that Vorbisfile does not really own it internally.  The
> FILE* is created in a program and released in a Vorbisfile DLL module,
> potentially using different memory management and file handlers. That
> will have to be documented very carefully to ensure proper callbacks
> are used.

Documented: agreed.

> Are there reasons for closing the file at all in Vorbisfile?  If not, I
> can just set the close callback to an empty function and close the file
> later.

Yes.  The basic thinking is that the source module should relinquish all 
control of the FILE *, as any external interference will confuse (at best) or 
crash (at worst) vorbisfile.  As the source of the FILE * must be totally 
hands-off anyway, Vorbisfile assumes responsibility of cleanup as well.

That's not *essential*; it would work just fine to make closing the 
responsibility of the external calling code.  But that's the thinking (and 
what other code currently assumes).

Monty

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list