summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-25 19:07:47 +0200
committerwm4 <wm4@nowhere>2013-04-25 20:49:23 +0200
commite1fccfdcd8a9efb2e3ce70cc4b7aba3e0eb91836 (patch)
tree645d3e1c5cf8df4113eb1942c4c3337547a18d01 /core/command.c
parent848542a513b27ae9b2d573b626e06bd96a99ca1d (diff)
downloadmpv-e1fccfdcd8a9efb2e3ce70cc4b7aba3e0eb91836.tar.bz2
mpv-e1fccfdcd8a9efb2e3ce70cc4b7aba3e0eb91836.tar.xz
core: don't let cache pause handling and user pausing conflict
The core pauses and unpauses automatically to wait for the network cache (also known as buffering). This conflicted with user pause control, and was perceived as if the player was unresponsive and/or the cache just overturned the user's decisions. Change it so that the actual pause state and the pause state as intended by the user never conflict. If the user toggles pause, the pause state will be in the expected state as soon as the cache is loaded.
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/command.c b/core/command.c
index 11d987819d..7497ea817f 100644
--- a/core/command.c
+++ b/core/command.c
@@ -527,7 +527,7 @@ static int mp_property_pause(m_option_t *prop, int action, void *arg,
}
return M_PROPERTY_OK;
case M_PROPERTY_GET:
- *(int *)arg = mpctx->paused;
+ *(int *)arg = mpctx->paused_user;
return M_PROPERTY_OK;
}
return M_PROPERTY_NOT_IMPLEMENTED;
@@ -2303,7 +2303,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
pause_player(mpctx);
break;
case 3: // "pausing_toggle"
- if (mpctx->paused)
+ if (mpctx->paused_user)
unpause_player(mpctx);
else
pause_player(mpctx);