diff options
Diffstat (limited to 'src/codec/ffmpeg')
| -rw-r--r-- | src/codec/ffmpeg/decoder.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/codec/ffmpeg/decoder.c b/src/codec/ffmpeg/decoder.c index 3aafd35..375bdfe 100644 --- a/src/codec/ffmpeg/decoder.c +++ b/src/codec/ffmpeg/decoder.c @@ -36,13 +36,12 @@ static bool ff_decoder_init(struct camu_decoder *dec, struct camu_renderer *rend goto err; } - /* s32 cpus = av_cpu_count(); if (cpus > 4) cpus = 2; - av->codec_context->thread_count = cpus; + av->codec_context->thread_count = cpus / 2; + // FF_THREAD_FRAME or FF_THREAD_SLICE. av->codec_context->thread_type = FF_THREAD_SLICE; al_log_debug("ff_decoder", "Using %i threads for decoder.", cpus); - */ #ifndef CAMU_SINK_NO_VIDEO if (codecpar->codec_type == AVMEDIA_TYPE_VIDEO && renderer && renderer->get_buffer2) { |