summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-24 13:58:57 +0100
committerwm4 <wm4@nowhere>2017-11-24 13:58:57 +0100
commitefbb91999796a33c91761d2c206d0f42beb4954c (patch)
tree58635fb0959f02cd4d34b9f72c44704e801114e5 /demux
parent274cc06aaf7ce764164898b31951c0d03b8c3638 (diff)
downloadmpv-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 'demux')
-rw-r--r--demux/demux.c1
1 files changed, 1 insertions, 0 deletions
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)