On Tuesday 30 November 2004 05:07, Makadi Janos wrote:> Hi,
>
> I made an app. to encode/decode vorbis streams. My encoder is based on
> the libvorbis documentation, and I use ov_read for decoding. The two
> process is running on seperate threads (not paralell). If I use the code
> only encode or decode everything works fine, but when I try to encode
> and decode in the same code (threads) It crashes.
>
> My question is, is libvorbisenc and libvorbisfile thread safe?
The vorbis libraries are fully reentrant, but not thread safe. This means that
it's safe to use multiple independent threads in the libraries, but NOT
multiple threads acting on the same datastructures - so you can independently
encode and decode in two threads, or encode two things, or decode.. etc, as
long as you don't share any state between them.
Mike