Skip to content

Commit

Permalink
vdec/lavd: print low-delay hint if applicable
Browse files Browse the repository at this point in the history
If not set, offer the disable even though there isn't any other hint. On
contrary, if already set (disabled), do not offer the setting.
  • Loading branch information
MartinPulec committed May 23, 2024
1 parent b431386 commit 89eb7f4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/video_decompress/libavcodec.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,9 +931,15 @@ static void check_duration(struct state_libavcodec_decompress *s, double duratio
hint = "\"--param lavd-thread-count=<n>\" option with small <n> or 0 (nr of logical cores)";
}
if (hint) {
log_msg(LOG_LEVEL_WARNING, MOD_NAME "Consider adding %s to increase throughput at the expense of latency.\n"
"You may also try to disable low delay decode using 'd' flag.\n",
hint);
MSG(WARNING,
"Consider adding %s to increase throughput at the expense "
"of latency.\n",
hint);
}
if ((s->codec_ctx->flags & AV_CODEC_FLAG_LOW_DELAY) != 0) {
MSG(WARNING,
"Consider %sdisabling low delay decode using 'd' flag.\n",
hint != NULL ? "also " : "");
}

bool in_rgb = av_pix_fmt_desc_get(s->convert_in)->flags & AV_PIX_FMT_FLAG_RGB;
Expand Down

0 comments on commit 89eb7f4

Please sign in to comment.