[Ffmpeg-devel] List of non-thread safe functions

Michael Niedermayer michaelni
Thu Feb 8 18:28:15 CET 2007


Hi

On Thu, Feb 08, 2007 at 03:46:09PM +0200, Stas Oskin wrote:
> Hi.
> 
> Thanks for the answer. So, it can be assumed that for a safe MT operation of
> libavcodec, all avcodec functions calls should be protected by mutex?

the functions you listed are probably a pretty accurate list of what needs a
mutex other functions like avcodec_encode/decode_* dont need a mutex, you
can encode or decode several things at once, of course you cannot call 2
avcodec_* functions with the same AVCodecContext at the same time, if that
could hapen then your application is missdesigned and you will likely have
various problems even with a mutex
and yes each encoder and decoder needs its own context ...

also all the simple utility functions like ff_gcd() are fully threadsafe

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070208/dde56244/attachment.pgp>



More information about the ffmpeg-devel mailing list