diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-10 15:51:44 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-13 19:58:20 +0000 |
commit | 6ea08be59ac503f7309a19a50d5e664426e8c9f3 (patch) | |
tree | b1fa116ee9c70e20bd0b8d390382c99de3c3a1c2 /player | |
parent | 331832f55df4d4c2bbf1231a6e519ef7a96aea8c (diff) | |
download | mpv-6ea08be59ac503f7309a19a50d5e664426e8c9f3.tar.bz2 mpv-6ea08be59ac503f7309a19a50d5e664426e8c9f3.tar.xz |
player: make sub-pos a float value
mpv makes this option an integer, but the underlying ass API actually
accepts doubles. From some testing, there is no meaningful precision
difference between float or double (it seems to go in roughly 0.05
steps), so just make it a float. sd_lavc also can handle non-integer
values here. Closes #11583.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index f84c33cec6..28c97f0d6f 100644 --- a/player/command.c +++ b/player/command.c @@ -2909,7 +2909,7 @@ static int mp_property_sub_pos(void *ctx, struct m_property *prop, MPContext *mpctx = ctx; struct MPOpts *opts = mpctx->opts; if (action == M_PROPERTY_PRINT) { - *(char **)arg = talloc_asprintf(NULL, "%d/100", opts->subs_rend->sub_pos); + *(char **)arg = talloc_asprintf(NULL, "%4.2f%%/100", opts->subs_rend->sub_pos); return M_PROPERTY_OK; } return mp_property_generic_option(mpctx, prop, action, arg); |