Is LibAV/FFMpeg thread safe? For example. Could I read from a file using AVFormatContext* in one thread and decode the read packet it in another with simple additions of mutexes or is the thread safetyness of the library a "don’t know don’t care" type deal? I know that libav has basic support for encoder threads but I’m trying more of a blackbox type approach where I break it up into multiple threads (Source -> Decoder -> Filter -> Encoder -> Sink) and trying to understand the complications of such.
Anyone with any experience with ffmpeg and threads and would like to chime in with any other info pertinent to this would also be greatly appreciated.
You can register your own lock manager. The ffmpeg library will control thread safety.
Example: