diff options
author | wm4 <wm4@nowhere> | 2014-10-07 21:01:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-07 21:01:19 +0200 |
commit | 128bb68d290107c15f2c5b38593048da6e321f40 (patch) | |
tree | 084aca6e7a42206593e486033339f1fcd192aa04 /player | |
parent | 9541537e32ce220bb6b603ad505217a904d3bf50 (diff) | |
download | mpv-128bb68d290107c15f2c5b38593048da6e321f40.tar.bz2 mpv-128bb68d290107c15f2c5b38593048da6e321f40.tar.xz |
client API: clarify pause/unpause events, modify core-idle property
Whether you consider the semantics weird or not depends on your use
case, but I suppose it's a bit confusing anyway. At this point, we keep
MPV_EVENT_PAUSE/UNPAUSE for compatibility only.
Make the "core-idle" property somewhat more useful in this context.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 8d4e3170a9..4b1f37288c 100644 --- a/player/command.c +++ b/player/command.c @@ -1020,7 +1020,8 @@ static int mp_property_core_idle(void *ctx, struct m_property *prop, int action, void *arg) { MPContext *mpctx = ctx; - return m_property_flag_ro(action, arg, mpctx->paused); + bool idle = mpctx->paused || !mpctx->restart_complete || !mpctx->playing; + return m_property_flag_ro(action, arg, idle); } static int mp_property_eof_reached(void *ctx, struct m_property *prop, |