mirror of
https://github.com/mpv-player/mpv.git
synced 2026-06-06 20:10:30 +00:00
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:
+2
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user