mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-01 19:02:18 +00:00
avviddec: use a more conservative default number of threads
When doing per-frame multithreading, FFmpeg introduces a delay of one frame per thread. On a machine with a high number of cores, the default maximum of 16 can easily lead to deadlocks in multiqueue. The ideal situation would have multiqueue query a latency downstream to add to its maximum, but that's not easily implemented. For now simply use a lower default maximum of 4, this should usually still be enough for real-time playback purposes, and can of course be set by the user through the max-threads property.
This commit is contained in:
parent
776d8a6617
commit
552e9c3659
|
@ -581,7 +581,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
|
|||
if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) ||
|
||||
(ffmpegdec->context->thread_type & FF_THREAD_FRAME))
|
||||
ffmpegdec->context->thread_count =
|
||||
MIN (gst_ffmpeg_auto_max_threads (), 16);
|
||||
MIN (gst_ffmpeg_auto_max_threads (), 4);
|
||||
else
|
||||
ffmpegdec->context->thread_count = 0;
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue