diff options
author | wm4 <wm4@nowhere> | 2014-12-10 17:52:21 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:13 +0900 |
commit | 9f80936ddc05b27945637b7944b8b6c894ff87ac (patch) | |
tree | c800492df23796c17650ec44cbc2fde1495df543 | |
parent | 6a8dad4c3ae853357ff820c6d1319ce25a318a4e (diff) | |
download | mpv-9f80936ddc05b27945637b7944b8b6c894ff87ac.tar.bz2 mpv-9f80936ddc05b27945637b7944b8b6c894ff87ac.tar.xz |
player: update chapter marks when switching files
This wasn't done, so the chapter marks of the previous file were
visible. It's harmless, but looks unpolished, so fix it.
Conflicts:
player/command.c
-rw-r--r-- | player/command.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 30189c72a5..9bd3b21deb 100644 --- a/player/command.c +++ b/player/command.c @@ -4627,8 +4627,11 @@ static void command_event(struct MPContext *mpctx, int event, void *arg) } ctx->prev_pts = now; } - if (event == MPV_EVENT_SEEK) { + if (event == MPV_EVENT_SEEK) ctx->prev_pts = MP_NOPTS_VALUE; + if (event == MPV_EVENT_END_FILE || event == MPV_EVENT_FILE_LOADED) { + // Update chapters - does nothing if something else is visible. + set_osd_bar_chapters(mpctx, OSD_BAR_SEEK); } } |