From efbb91999796a33c91761d2c206d0f42beb4954c Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 24 Nov 2017 13:58:57 +0100 Subject: 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). --- demux/demux.c | 1 + 1 file changed, 1 insertion(+) (limited to 'demux') diff --git a/demux/demux.c b/demux/demux.c index 6289699e56..5795111753 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1937,6 +1937,7 @@ static struct demuxer *open_given_type(struct mpv_global *global, .is_network = stream->is_network, .access_references = opts->access_references, .events = DEMUX_EVENT_ALL, + .duration = -1, }; demuxer->seekable = stream->seekable; if (demuxer->stream->underlying && !demuxer->stream->underlying->seekable) -- cgit v1.2.3