[vorbis-dev] [PATCH] make vorbis work with KDE 3.0

Michael Smith msmith at labyrinth.net.au
Wed Mar 20 01:53:13 PST 2002



>Vorbis decodes in its own thread and reads from the
>callbacks the input data.
>User presses "stop" in the player, then the "GUI" thread
>closes the input fd. (stream is closed)
>If vorbis is doing a seek this "race" occurs:

This is a bug in your player, then. It happens to be more serious
than it would otherwise be because of a bug in vorbisfile, but you're
violating vorbisfile's requirement that the stream be closed by 
ov_close() (or if you choose to have the close callback not do 
anything, then after ov_close() is called).

The user pressing "stop" should cause ov_close() to be called (which
in a threaded environment like this means you'll need to synchronise
calls such that only one thread uses an OggVorbis_File at a time,
but that shouldn't be difficult).

The above is meant as advice on how this should work - since a
similar situation can occur anyway (a seek could just fail for
any number of reasons), this is certainly a bug in vorbisfile,
and it'll be fixed. We cannot (and will not) guarantee that the
way you're using vorbisfile will generally work, however.

I have a fix locally, it needs more testing before I commit.

Michael

--- >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-dev-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-dev mailing list