diff options
author | wm4 <wm4@nowhere> | 2015-03-11 12:07:52 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-03-15 20:07:06 +0900 |
commit | 62d922e4f0d0c165f7edd880924946f660eef85d (patch) | |
tree | 31e192ee51655b72bb2cc2eabd8a26a837353151 | |
parent | eaa5393c4a1c7fdc75b5626498e6721d3be59132 (diff) | |
download | mpv-62d922e4f0d0c165f7edd880924946f660eef85d.tar.bz2 mpv-62d922e4f0d0c165f7edd880924946f660eef85d.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.
(cherry picked from commit e9841630ad2962e106ebf6c6d1afd032cbf93b33)
-rw-r--r-- | player/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c index b89f7c0050..c4dca77708 100644 --- a/player/command.c +++ b/player/command.c @@ -2297,15 +2297,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); |