[Ffmpeg-devel] Problem with multithread

Steve Lhomme slhomme
Tue Aug 1 15:35:10 CEST 2006

nguyen hoang viet wrote:
> Hi all !
>     Now i develope application that has multithread using ffmpeg library(with VC++). When i run multithread it always has bug like:
>     +Division by zero.
>     +Access memory violation.
>     Who has experience in this case please give me some advice. Because it take a lots of my time to fix it? And what tools i can use to debug with .dll or library source code easily?
> Thanks in advance.

Try to check all the files you're using that may have global variables 
and get rid of it.

You might also create various instances of libavcodec/libavformat if you 
need to read various things at the same time.

Finally, if you access the same decoder/encoder from various thread you 
have to protect the calls yourself with a mutex, via an extra layer of code.


More information about the ffmpeg-devel mailing list