summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-11 12:07:52 +0100
committerwm4 <wm4@nowhere>2015-03-11 12:10:04 +0100
commite9841630ad2962e106ebf6c6d1afd032cbf93b33 (patch)
treee01e4dc7643145a6a5772acd92672a7a326a9e69
parentca474d22c98d678003cf5c94612d874d79eae442 (diff)
downloadmpv-e9841630ad2962e106ebf6c6d1afd032cbf93b33.tar.bz2
mpv-e9841630ad2962e106ebf6c6d1afd032cbf93b33.tar.xz
command: allow changing some VO options even if VO wasn't created yet
Instead of refusing to set properties like "fullscreen" if no VO was created, always allow it. So if no VO is created, setting the property merely changes the options (and will be applied once the VO is created). This is consistent with similar behavior changes to some other properties. Improves the behavior reported in #1676. Also, we shouldn't check the config_ok variable - the VO should do this.
-rw-r--r--player/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index 1d872eacb7..55cb86cdb8 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2310,15 +2310,15 @@ static int panscan_property_helper(void *ctx, struct m_property *prop,
static int mp_property_vo_flag(struct m_property *prop, int action, void *arg,
int vo_ctrl, int *vo_var, MPContext *mpctx)
{
- if (!mpctx->video_out)
- return M_PROPERTY_UNAVAILABLE;
-
if (action == M_PROPERTY_SET) {
int desired = !!*(int *) arg;
if (*vo_var == desired)
return M_PROPERTY_OK;
- if (mpctx->video_out->config_ok)
+ if (mpctx->video_out) {
vo_control(mpctx->video_out, vo_ctrl, 0);
+ } else {
+ *vo_var = desired;
+ }
return *vo_var == desired ? M_PROPERTY_OK : M_PROPERTY_ERROR;
}
return mp_property_generic_option(mpctx, prop, action, arg);