This is probably error in your application. There are some thread unsafe functions in FFmpeg (you should initialize your own mutex with av_lockmgr_register()) but not the decoding function unless you access to the packets/frames from different threads.
The best way is to COPY packets to own thread-safe sequences (each sequence per decoding thread). I do that in my own application (one thread for reading packets, one thread for decoding audio and two streams to decode the video) and did not detect any thread errors in the FFmpeg itself. 2011/2/4 Gilles Maire <[email protected]> > Hi, > > I call avcodec_decode_video2 from several threads ( one for h264 and one > for > mpeg12 ) and I have Packet and Frame corrupted. What is th best way to > prevent it ? > > Many thanks > ----------------------------------------------- Kirill Gavrilov, Software designer. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
