On 15 May 2013 19:13, "Joe Flowers" <[email protected]> wrote: > > Carl and Hendrik, > > Thank you very much for your comments and expertise. > > You are right, I'm mixing up thread-safety and re-entrantcy. Sorry. > > With Hendrik's advice on not cancelling threads to prevent a deadlock or zombie-type threads, I'm now more concerned with thread-safeness. > > 1. > I know when I configure and make FFMPEG, there is an "--enable-pthreads" option. If I am understanding things correctly, this particular option is not relevant to the thread safety of a C program calling the libav* APIs, correct?
Some codecs allow multithreaded processing to speed things up (on multicore systems). That's where pthreads become relevant. > 2. > I am using gcc on Ubuntu to compile and link to the libav* libraries and am wondering if I need to use a particular "-pthreads" option (or something else) with gcc to make sure I am using thread-safe C libraries to get a thread-safe malloc()? In your toolchain, malloc is thread-safe. > The reason I ask is because in Windoze one has to link with the mulithreaded C libraries (*MT.lib) to get a thread-safe version of malloc(). Non-multithread RT libraries for Microsoft C compiler are long gone. BR Alex
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
