From f0cdd673a80ff8f89b3f4c136620e398217bfccf Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 10 Dec 2014 17:52:21 +0100 Subject: 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. --- player/command.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 0e7c505104..66ab4eb95f 100644 --- a/player/command.c +++ b/player/command.c @@ -4650,6 +4650,10 @@ static void command_event(struct MPContext *mpctx, int event, void *arg) ctx->is_idle = true; if (event == MPV_EVENT_START_FILE) ctx->is_idle = false; + 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); + } } void mp_notify(struct MPContext *mpctx, int event, void *arg) -- cgit v1.2.3