From b4313864d84fc5153f62481456ba10a227accd7c Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 22 May 2024 14:50:53 +0200 Subject: [PATCH] vdec/lavd: check_duration wrong cond It was perhaps meant to advise frame threads if not enabled, not if slice thread is not enabled. --- src/video_decompress/libavcodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_decompress/libavcodec.c b/src/video_decompress/libavcodec.c index 86381e106..25836ce43 100644 --- a/src/video_decompress/libavcodec.c +++ b/src/video_decompress/libavcodec.c @@ -923,7 +923,9 @@ static void check_duration(struct state_libavcodec_decompress *s, double duratio MOV_WIN_FRM, s->mov_avg_comp_duration * MS_IN_SEC, tpf * MS_IN_SEC, TIME_SLOT_PERC_MAX); const char *hint = NULL; - if ((s->codec_ctx->thread_type & FF_THREAD_SLICE) == 0 && (s->codec_ctx->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) != 0) { + if ((s->codec_ctx->thread_type & FF_THREAD_FRAME) == 0 && + (s->codec_ctx->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) != + 0) { hint = "\"--param lavd-thread-count=FS\" option with small or 0 (nr of logical cores)"; } else if (s->codec_ctx->thread_count == 1 && (s->codec_ctx->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) != 0) { hint = "\"--param lavd-thread-count=\" option with small or 0 (nr of logical cores)";