summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Panteleev <git@thecybershadow.net>2016-09-13 01:17:40 +0000
committerwm4 <wm4@nowhere>2016-09-13 09:23:26 +0200
commitfb8f2a812e3bfccebd765d48335c4921d9d67b5a (patch)
tree73777ec8ff08a897673ae2d0c80f0127a9bc7289
parent00f8ee573ba3ff75f3591137b68faf563affb343 (diff)
downloadmpv-fb8f2a812e3bfccebd765d48335c4921d9d67b5a.tar.bz2
mpv-fb8f2a812e3bfccebd765d48335c4921d9d67b5a.tar.xz
player: Improve OSD formatting of sub-speed option
-rw-r--r--player/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 6e30489954..5d543e5552 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2958,6 +2958,9 @@ static int mp_property_sub_speed(void *ctx, struct m_property *prop,
}
return M_PROPERTY_OK;
}
+ case M_PROPERTY_PRINT:
+ *(char **)arg = talloc_asprintf(NULL, "%4.1f%%", 100 * opts->sub_speed);
+ return M_PROPERTY_OK;
}
return property_osd_helper(mpctx, prop, action, arg);
}
@@ -4174,6 +4177,7 @@ static const struct property_osd_display {
{ "secondary-sid", "Secondary subtitles" },
{ "sub-pos", "Sub position" },
{ "sub-delay", "Sub delay" },
+ { "sub-speed", "Sub speed" },
{ "sub-visibility", .msg = "Subtitles ${!sub-visibility==yes:hidden}"
"${?sub-visibility==yes:visible${?sub==no: (but no subtitles selected)}}" },
{ "sub-forced-only", "Forced sub only" },