Skip to content

gstavviddec: Limit default number of decoder threads

Alicia Boya García requested to merge ntrrgc/gst-libav:max-threads into master

When the max-threads property is not specified, GStreamer defaults to the amount of CPU threads in the system.

The number of threads used in avdec has a direct impact on the latency of the decoder, which is of as many frames as threads. Therefore, big numbers of threads can make latency levels that can be problematic in some applications.

For this reason, ffmpeg emits a warning when more than 16 threads are requested.

This patch limits the default number of threads to 16. This affects only computers with more than 16 CPU threads when using avviddec without setting max-threads.

Merge request reports

Loading