summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-31 22:54:57 +0200
committerwm4 <wm4@nowhere>2014-07-31 22:54:57 +0200
commit33f465d9a787698ba42749b273f58327b40a59d3 (patch)
treef3550e09fdd2b0c05ddf06d243c16fed4a773abc
parentde8e9ca9d27969c9bc423282a30a17673f37caa7 (diff)
downloadmpv-33f465d9a787698ba42749b273f58327b40a59d3.tar.bz2
mpv-33f465d9a787698ba42749b273f58327b40a59d3.tar.xz
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.
-rw-r--r--player/playloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c
index b1d3efeecf..564b4e739c 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -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);