summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2014-03-25 22:41:28 +0900
committerwm4 <wm4@nowhere>2014-03-30 17:53:05 +0200
commitfc510f0da889f392c1e6985eab9a40e37986cba8 (patch)
treee9c1ae551fe04a654c4173b02b5b64776a65ab74 /player
parent8d5775a8d2ae7e5ebf031da8b6ab51ec2e7ff3fb (diff)
downloadmpv-fc510f0da889f392c1e6985eab9a40e37986cba8.tar.bz2
mpv-fc510f0da889f392c1e6985eab9a40e37986cba8.tar.xz
dvdnav: make MP_NAV_EVENT_RESET_ALL handled properly
dvdnav.c did not handle event in regular sequence. Usually this does not make any trouble except around MP_NAV_EVENT_RESET_ALL. Those events should be handled in regular sequence. If they're mixed, it can make wrong result. For instance, MP_NAV_EVENT_HIGHLIGHT right after MP_NAV_EVENT_RESET_ALL should not be ignored but it might be because MP_NAV_EVENT_RESET_ALL makes the demuxer reloaded and osd hidden.
Diffstat (limited to 'player')
-rw-r--r--player/dvdnav.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/dvdnav.c b/player/dvdnav.c
index 6c5fed2ed6..3f711b4834 100644
--- a/player/dvdnav.c
+++ b/player/dvdnav.c
@@ -140,7 +140,9 @@ void mp_handle_nav(struct MPContext *mpctx)
case MP_NAV_EVENT_RESET_ALL: {
mpctx->stop_play = PT_RELOAD_DEMUXER;
MP_VERBOSE(nav, "reload\n");
- break;
+ // return immediately.
+ // other events should be handled after reloaded.
+ return;
}
case MP_NAV_EVENT_RESET: {
nav->nav_still_frame = 0;