[Libav-user] H264 multithreading

Andrey Shvyrkin ashvyrkin at gosniias.ru
Wed Nov 19 12:58:36 CET 2014


Hi, I develop the player to decode the stream from the camera. My 
program execution occurs on the device on ARM-architecture to improve 
performance and use multi-threading.

avCodecContext->thread_count = 0;
avCodecContext->thread_type = FF_THREAD_SLICE | FF_THREAD_FRAME;

But on some cameras decoding occurs normally, while on others do not 
come frames.
If I add a flag

avCodecContext->flags2 |= CODEC_FLAG2_CHUNKS;

, then all the cells occurs decoding, but it turned off multithreading. 
If not, I can use multi-threading for all streams. How better to 
implement enable / disable multithreading?


More information about the Libav-user mailing list