From d8bd1c35ef6fb397a8ad2987cc41bab805f43e6c Mon Sep 17 00:00:00 2001 From: rcombs Date: Thu, 27 May 2021 00:58:27 -0500 Subject: [PATCH] loadfile: expose auto-forced-only when printing stream info --- player/loadfile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/player/loadfile.c b/player/loadfile.c index 1bd16ebe50..4ef1d4027b 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -258,7 +258,13 @@ static void print_stream(struct MPContext *mpctx, struct track *t) break; } char b[2048] = {0}; - APPEND(b, " %3s %-5s", t->selected ? "(+)" : "", tname); + bool forced_only = false; + if (t->type == STREAM_SUB) { + int forced_opt = mpctx->opts->subs_rend->forced_subs_only; + if (forced_opt == 1 || (forced_opt && t->forced_only_def)) + forced_only = t->selected; + } + APPEND(b, " %3s %-5s", t->selected ? (forced_only ? "(*)" : "(+)") : "", tname); APPEND(b, " --%s=%d", selopt, t->user_tid); if (t->lang && langopt) APPEND(b, " --%s=%s", langopt, t->lang); @@ -268,6 +274,8 @@ static void print_stream(struct MPContext *mpctx, struct track *t) APPEND(b, " (f)"); if (t->attached_picture) APPEND(b, " [P]"); + if (forced_only) + APPEND(b, " [F]"); if (t->title) APPEND(b, " '%s'", t->title); const char *codec = s ? s->codec->codec : NULL;