[FFmpeg-devel] [PATCH] avcodec thread safety fix
Fri May 29 23:30:28 CEST 2009
On Fri, May 29, 2009 at 09:15:11AM -0700, Art Clarke wrote:
> - Not for this patch, but ideas for later. The locking avcodec_open
> and avcodec_close in libavcodec/utils.c is (AFAIK) protecting the
> specific AVCodec implementation so it can open and close without any
> other thread ON THE SAME CODEC accidentally initializing static
> AVCodec lookup tables and the like. Therefore once you have the ideas
> of mutexes in your API (good suggestion Michael), the lock in utils.c
> should be on a member of AVCodec rather than a static (and therefore
> global across all codecs) variable which would slightly increase
> throughput. The risk here is that I'm wrong and that lock is
> protecting more than the AVCodec's specific initialization.
some codecs are rather similar and share stuff, so this system would have
to be more complex to work.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel