I read (somewhere, I donβt remember and did not find it now - maybe the question would be obsolete for me anyway) that some FFmpeg functions are unsafe for calling from multiple threads at the same time.
FFmpeg itself is not multithreaded in the sense that you should not call av_read_frame or avcodec_decode_audio4 in the same context from different threads at the same time, but this is mostly obvious.
But, for example, it seems that avformat_find_stream_info even in individual contexts, is unsafe to be called from different threads at the same time. To make this safe, you will need a global mutex.
Is there a list of features that are not safe?
Albert
source share