player: dvdnav: fix start time when entering and leaving menu

Unfortunately, quite a hack, because we have check the nav state
outside of discnav.c.
This commit is contained in:
wm4 2014-03-30 07:31:02 +02:00
parent 8487bb2c54
commit 9be2f6b9f8
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ double get_start_time(struct MPContext *mpctx)
struct demuxer *demuxer = mpctx->demuxer;
if (!demuxer)
return 0;
// We reload the demuxer on menu transitions; don't make it use the first
// timestamp it finds as start PTS.
if (mpctx->nav_state)
return 0;
return demuxer_get_start_time(demuxer);
}