[FFmpeg-devel] [RFC] ffmpeg.c refactoring

Michael Niedermayer michaelni
Mon Jun 16 04:30:35 CEST 2008

On Sun, Jun 15, 2008 at 04:07:18PM -0700, John Kelley wrote:
> On Thu, Jun 12, 2008 at 12:32 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Are users thread hijacking safe yet? seems not> Are users thread hijacking safe yet? seems not
> It was a legitimate question, relevant to the user's query; meant to help him.
> > go away troll. libav* is thread safe, is used by many in multithreaded
> > environments and i dont remember anyone discussing or doubting this.
> You should get your memory checked and not be so sour - you in fact
> responded to the main thread I was referring to. "[Ffmpeg-devel] List
> of non-thread safe functions" from 2/7/07 is one such discussion that
> specifically mentions certain functions in libavcodec that need to be
> wrapped in mutexes in order to be thread safe.
> So now I re-iterate my question - have the problems in the above
> mentioned thread been fixed or do they still need fixing?

I re-iterate my awnser, libav* is thread safe.
This does mean it can be used from multiple threads, and that you can
have many encoders and decoders running at the same time. It does not
mean that every function can be called while every other is executing.
Its documented in the headers what is ok and what not.

Lav* will also work fine no matter what obscure thread implementation
there is on your platform. If it did the locking internally in each
function which might need it, not only would it waste resources and
time for single threaded apps. It also would not work at all when
lavc lacked support for some thread implementation.


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080616/90985420/attachment.pgp>

More information about the ffmpeg-devel mailing list