summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-30 00:22:25 +0200
committerwm4 <wm4@nowhere>2014-07-30 00:22:38 +0200
commit593ad996e0621666d5c6d39c52f8119e5337af03 (patch)
tree01f97e056db0ae8c364fb770456df3c197f615ab /player/command.c
parentb6a7c321db633b47590db957125337d9ec8ce9eb (diff)
downloadmpv-593ad996e0621666d5c6d39c52f8119e5337af03.tar.bz2
mpv-593ad996e0621666d5c6d39c52f8119e5337af03.tar.xz
player: fix time display wheen seeking past EOF with --keep-open
Regression since commit 261506e3. Internally speaking, playback was often not properly terminated, and the main part of handle_keep_open() was just executed once, instead of any time the user tries to seek. This means playback_pts was not set, and the "current time" was determined by the seek target PTS. So fix this aspect of video EOF handling, and also remove the now unnecessary eof_reached field. The pause check before calling pause_player() is a lazy workaround for a strange event feedback loop that happens on EOF with --keep-open.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index d0b310bade..eedbc0bbc7 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1079,7 +1079,9 @@ static int mp_property_eof_reached(void *ctx, struct m_property *prop,
int action, void *arg)
{
MPContext *mpctx = ctx;
- return m_property_flag_ro(action, arg, mpctx->eof_reached);
+ bool eof = mpctx->video_status == STATUS_EOF &&
+ mpctx->audio_status == STATUS_EOF;
+ return m_property_flag_ro(action, arg, eof);
}
static int mp_property_cache(void *ctx, struct m_property *prop,