[Libav-user] Using the libav* libraries in a thread-safe manner?

Carl Eugen Hoyos cehoyos at ag.or.at
Wed May 15 17:37:47 CEST 2013


Joe Flowers <joe.flowers at ...> writes:

> I need to use the libav* APIs (specifically the audio 
> codecs) in a thread-safe way, but they seem to be full 
> of malloc()s and free()s which aren't re-entrant.

My malloc manual says that it uses mutexes "internally to 
protect the memory-management data structures employed by 
these functions" (alloc, free, etc.) to avoid corruption.
Or do I miss something?

Audio codecs generally don't use multi-threading and 
should therefore not require special treatment.

Carl Eugen



More information about the Libav-user mailing list