diff options
author | wm4 <wm4@nowhere> | 2014-04-14 22:19:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-14 22:19:07 +0200 |
commit | 60b900487257a3435df02c2b2ce54551c59e4311 (patch) | |
tree | 3e9975204ed1403e250604ea60bd5fc14b1b0abf /player/playloop.c | |
parent | 1e3e7bb7f4dd87d767c519c73a0ac6e26bd19c15 (diff) | |
download | mpv-60b900487257a3435df02c2b2ce54551c59e4311.tar.bz2 mpv-60b900487257a3435df02c2b2ce54551c59e4311.tar.xz |
command: add property to indicate when pausing due to --keep-open
This property is set to "yes" if playback was paused due to --keep-open.
The change notification might not always be perfect; maybe that should
be improved.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c index 967963b5dc..20a3104596 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -204,6 +204,7 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao, bool reset_ac) mpctx->drop_frame_cnt = 0; mpctx->dropped_frames = 0; mpctx->playback_pts = MP_NOPTS_VALUE; + mpctx->eof_reached = false; #if HAVE_ENCODING encode_lavc_discontinuity(mpctx->encode_lavc_ctx); @@ -834,6 +835,7 @@ static void handle_keep_open(struct MPContext *mpctx) if (opts->keep_open && mpctx->stop_play == AT_END_OF_FILE) { mpctx->stop_play = KEEP_PLAYING; mpctx->playback_pts = mpctx->last_vo_pts; + mpctx->eof_reached = true; pause_player(mpctx, PAUSE_BY_KEEP_OPEN); } } @@ -1306,6 +1308,7 @@ void idle_loop(struct MPContext *mpctx) while (mpctx->opts->player_idle_mode && !mpctx->playlist->current && mpctx->stop_play != PT_QUIT) { + mpctx->eof_reached = true; if (need_reinit) { mp_notify(mpctx, MPV_EVENT_IDLE, NULL); handle_force_window(mpctx, true); |