Le nonidi 19 thermidor, an CCXX, Christian Brümmer a écrit : > As soon as i try to use avcodec_decode_video2 parallel at the same > time i got many ffmpeg log errors and the videoframe is messed up
You can not use the same AVCodecContext simultaneously from several threads. You could create several AVCodecContext and use them simultaneously, or you can keep a single one: it will return you the frames sequentially, but behind the scenes it will decode in parallel. I do not think the first solution can work if the frames come from the same stream: zerolatency means that no frame depends on a later frame, either at encoding or at decoding, but they still depend on previous frames. Otherwise, it is an I-frame only codec, and the bitrate is much higher. In fact, my intuition says that zerolatency will more or less kill all hope of parallel frame decoding. Fortunately, you can still go for slice-based threading. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
