0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

command: allow setting panscan etc. properties if no video is active

In that case, it merely changes the underlying option value.
This commit is contained in:
wm4 2016-04-15 11:32:03 +02:00
parent a9bd4535d2
commit 177f5d9e9c

View File

@ -2324,12 +2324,9 @@ static int panscan_property_helper(void *ctx, struct m_property *prop,
int action, void *arg)
{
MPContext *mpctx = ctx;
if (!mpctx->video_out
|| vo_control(mpctx->video_out, VOCTRL_GET_PANSCAN, NULL) != VO_TRUE)
return M_PROPERTY_UNAVAILABLE;
int r = mp_property_generic_option(mpctx, prop, action, arg);
if (action == M_PROPERTY_SET)
if (mpctx->video_out && action == M_PROPERTY_SET)
vo_control(mpctx->video_out, VOCTRL_SET_PANSCAN, NULL);
return r;
}