From e9841630ad2962e106ebf6c6d1afd032cbf93b33 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 11 Mar 2015 12:07:52 +0100 Subject: 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. --- player/command.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'player/command.c') 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); -- cgit v1.2.3