Skip to content

Commit 2f01fbc

Browse files
committed
lavc: do not suggest frame threads if not avail.
1 parent fd15d5f commit 2f01fbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/video_compress/libavcodec.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,8 @@ static void set_codec_thread_mode(AVCodecContext *codec_ctx, struct setparam_par
16811681
if (req_thread_type == 0) {
16821682
if ((codec_ctx->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) != 0) {
16831683
req_thread_type = FF_THREAD_SLICE;
1684-
} else if ((codec_ctx->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) == 0) {
1684+
} else if ((codec_ctx->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) == 0 &&
1685+
(codec_ctx->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) != 0) {
16851686
log_msg(LOG_LEVEL_WARNING, MOD_NAME "Slice-based or external multithreading not available, encoding won't be parallel. "
16861687
"You may select frame-based paralellism if needed.\n");
16871688
}

0 commit comments

Comments
 (0)