diff options
author | wm4 <wm4@nowhere> | 2017-11-24 13:58:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-11-24 13:58:57 +0100 |
commit | efbb91999796a33c91761d2c206d0f42beb4954c (patch) | |
tree | 58635fb0959f02cd4d34b9f72c44704e801114e5 /player/command.c | |
parent | 274cc06aaf7ce764164898b31951c0d03b8c3638 (diff) | |
download | mpv-efbb91999796a33c91761d2c206d0f42beb4954c.tar.bz2 mpv-efbb91999796a33c91761d2c206d0f42beb4954c.tar.xz |
player: minor fix/simplification of OSD time/duration handling
Always display the duration as "unknown" if the duration is known. Also
fix that at least demux_lavf reported unknown duration as 0 (fix by
setting the default to unknown in demux.c).
Remove the dumb _u formatter function, and use a different approach to
avoiding displaying "unknown" as playback time on playback start (set
last_seek_pts for that).
Diffstat (limited to 'player/command.c')
-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 807b2614a7..b5317e1470 100644 --- a/player/command.c +++ b/player/command.c @@ -837,7 +837,7 @@ static bool time_remaining(MPContext *mpctx, double *remaining) double len = get_time_length(mpctx); double playback = get_playback_time(mpctx); - if (playback == MP_NOPTS_VALUE) + if (playback == MP_NOPTS_VALUE || len <= 0) return false; *remaining = len - playback; |