mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
ffmpegdec: Use auto-threads if available, and only slice-threading
Slice threading causes less latency (and corruption)
This commit is contained in:
parent
0a16f7edf6
commit
57c7f59268
1 changed files with 8 additions and 3 deletions
|
@ -884,11 +884,16 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
|
|||
* supports it) */
|
||||
ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
|
||||
|
||||
if (ffmpegdec->max_threads == 0)
|
||||
ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
|
||||
else
|
||||
if (ffmpegdec->max_threads == 0) {
|
||||
if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS))
|
||||
ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
|
||||
else
|
||||
ffmpegdec->context->thread_count = 0;
|
||||
} else
|
||||
ffmpegdec->context->thread_count = ffmpegdec->max_threads;
|
||||
|
||||
ffmpegdec->context->thread_type = FF_THREAD_SLICE;
|
||||
|
||||
/* open codec - we don't select an output pix_fmt yet,
|
||||
* simply because we don't know! We only get it
|
||||
* during playback... */
|
||||
|
|
Loading…
Reference in a new issue