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.
This commit is contained in:
wm4 2015-10-23 12:14:17 +02:00
parent 53c720d412
commit d1528e51d5
1 changed files with 2 additions and 1 deletions

View File

@ -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,