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.
This commit is contained in:
wm4 2014-12-10 17:52:21 +01:00
parent ccd4a732ab
commit f0cdd673a8
1 changed files with 4 additions and 0 deletions

View File

@ -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)