diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-10 18:53:45 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-13 19:58:20 +0000 |
commit | c62b45ec2ab020dad04a95aff3c85aab631b1f32 (patch) | |
tree | 3c3c41ef746155f0d7687e2266abac47c00292c9 /player/osd.c | |
parent | 6ea08be59ac503f7309a19a50d5e664426e8c9f3 (diff) | |
download | mpv-c62b45ec2ab020dad04a95aff3c85aab631b1f32.tar.bz2 mpv-c62b45ec2ab020dad04a95aff3c85aab631b1f32.tar.xz |
player: add --term-remaining-playtime option
The OSC reports the speed-adjusted remaining time, but the terminal does
not. This is a weird mismatch and the OSC's default behavior makes
sense, so let's just do some division and add an option to disable it.
Also named "remaining-playtime" after the OSC option. Fixes #10445.
Diffstat (limited to 'player/osd.c')
-rw-r--r-- | player/osd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/osd.c b/player/osd.c index a6b0aa8614..92647a793e 100644 --- a/player/osd.c +++ b/player/osd.c @@ -195,9 +195,10 @@ static char *get_term_status_msg(struct MPContext *mpctx) saddf(&line, ": "); // Playback position + double speed = opts->term_remaining_playtime ? mpctx->video_speed : 1; sadd_hhmmssff(&line, get_playback_time(mpctx), opts->osd_fractions); saddf(&line, " / "); - sadd_hhmmssff(&line, get_time_length(mpctx), opts->osd_fractions); + sadd_hhmmssff(&line, get_time_length(mpctx) / speed, opts->osd_fractions); sadd_percentage(&line, get_percent_pos(mpctx)); |