diff options
author | wm4 <wm4@nowhere> | 2014-11-02 17:20:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-02 17:29:41 +0100 |
commit | 969757baa0af99d905a9b8c99f0c92efa4e0fb33 (patch) | |
tree | 2db51b2e3bc89dce550fc1c9fbf31c7471a41fce /player/playloop.c | |
parent | 1cebd16350229d2ab1441f5061079ce9240fb22f (diff) | |
download | mpv-969757baa0af99d905a9b8c99f0c92efa4e0fb33.tar.bz2 mpv-969757baa0af99d905a9b8c99f0c92efa4e0fb33.tar.xz |
player: always use demux_chapter
Instead of defining a separate data structure in the core.
For some odd reason, demux_chapter exported the chapter time in
nano-seconds. Change that to the usual timestamps (rename the field
to make any code relying on this to fail compilation), and also remove
the unused chapter end time.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c index 8a0aba2ec8..22cc12f70d 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -451,7 +451,7 @@ int get_current_chapter(struct MPContext *mpctx) double current_pts = get_current_time(mpctx); int i; for (i = 0; i < mpctx->num_chapters; i++) - if (current_pts < mpctx->chapters[i].start) + if (current_pts < mpctx->chapters[i].pts) break; return MPMAX(mpctx->last_chapter_seek, i - 1); } @@ -490,7 +490,7 @@ double chapter_start_time(struct MPContext *mpctx, int chapter) if (chapter == -1) return get_start_time(mpctx); if (chapter >= 0 && chapter < mpctx->num_chapters) - return mpctx->chapters[chapter].start; + return mpctx->chapters[chapter].pts; return MP_NOPTS_VALUE; } |