[Ffmpeg-devel] List of non-thread safe functions
Fri Feb 9 20:22:30 CET 2007
On Fri, Feb 09, 2007 at 07:37:36PM +0200, Stas Oskin wrote:
> >Oh, and don't top-post. cf. Netiquette.
> Sorry, will pay attention from now on.
> >the functions you listed are probably a pretty accurate list of what needs
> I have the feeling that not only these functions should be mutex'ed. After I
> increased the number of concurrent threads, I encountered a lot of errors
> returned by setup functions like av_codec_open(), even when they are
> protected by mutex. I think the earlier functions, like av_set_parameters(),
> av_open_stream() should be protected as well.
> Anyone can comment on this?
you can of course not run 2 av_set_parameters() with the same context at
the same time or run av_set_parameters() while some other code uses the
context, that is common sense and i wouldnt call it thread unsafe also
of course you must wait until all the init functions finish before you
can use the context and stop using it before you close it
the really thread unsafe functions like some init functions need a global
mutex as they init global tables
i hope that clarifies it, also feel free to send a patch which adds detailed
thread safety information as doxygen comments to the functions ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel