summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-23 12:14:17 +0200
committerwm4 <wm4@nowhere>2015-10-23 12:14:17 +0200
commitd1528e51d50002a67b692ec359b61aba9258d3c2 (patch)
treed63d6655df567ca7e7872d19f54e557fbd3d1b85 /player/osd.c
parent53c720d412c5ae20848510b3a51df07305d7b708 (diff)
downloadmpv-d1528e51d50002a67b692ec359b61aba9258d3c2.tar.bz2
mpv-d1528e51d50002a67b692ec359b61aba9258d3c2.tar.xz
player: offset chapter display by start time
Some mkv files can have this. The chapter times are still timestamps (and thus not affected by the start time), but it misplaces the OSD chapter ticks.
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/osd.c b/player/osd.c
index 65747bc7cf..da14f8ff2b 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -368,7 +368,8 @@ void set_osd_bar_chapters(struct MPContext *mpctx, int type)
} else {
int num = get_chapter_count(mpctx);
for (int n = 0; n < num; n++) {
- double time = chapter_start_time(mpctx, n);
+ double time = chapter_start_time(mpctx, n) -
+ get_start_time(mpctx);
if (time >= 0) {
float pos = time / len;
MP_TARRAY_APPEND(mpctx, mpctx->osd_progbar.stops,