mirror of https://github.com/mpv-player/mpv
player: don't ignore first chapter
It's a mystery why this was done this way. If the first chapter starts later than the current position, we do have to return -1.
This commit is contained in:
parent
de8e9ca9d2
commit
33f465d9a7
|
@ -432,7 +432,7 @@ int get_current_chapter(struct MPContext *mpctx)
|
|||
return -2;
|
||||
double current_pts = get_current_time(mpctx);
|
||||
int i;
|
||||
for (i = 1; i < mpctx->num_chapters; i++)
|
||||
for (i = 0; i < mpctx->num_chapters; i++)
|
||||
if (current_pts < mpctx->chapters[i].start)
|
||||
break;
|
||||
return MPMAX(mpctx->last_chapter_seek, i - 1);
|
||||
|
|
Loading…
Reference in New Issue