From d1528e51d50002a67b692ec359b61aba9258d3c2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Oct 2015 12:14:17 +0200 Subject: 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. --- player/osd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3