summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2021-05-27 00:58:27 -0500
committersfan5 <sfan5@live.de>2023-06-25 11:01:58 +0200
commitd8bd1c35ef6fb397a8ad2987cc41bab805f43e6c (patch)
treea4d1e97f5f1bb91561f1e6722dcc3fa568cca96f /player/loadfile.c
parent5c4852d1730c415fc9311a39c6f7003d9c914792 (diff)
downloadmpv-d8bd1c35ef6fb397a8ad2987cc41bab805f43e6c.tar.bz2
mpv-d8bd1c35ef6fb397a8ad2987cc41bab805f43e6c.tar.xz
loadfile: expose auto-forced-only when printing stream info
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c10
1 files changed, 9 insertions, 1 deletions
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;