diff options
author | wm4 <wm4@nowhere> | 2013-05-05 19:09:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-09 01:16:04 +0200 |
commit | c40069a3810e401862386b737c140e3f590afc8d (patch) | |
tree | 237e785519d240e4faf04fadb6f745e079d1f22a /core | |
parent | 2c6c842719b19c0c71c188e7337f15bb60f2585c (diff) | |
download | mpv-c40069a3810e401862386b737c140e3f590afc8d.tar.bz2 mpv-c40069a3810e401862386b737c140e3f590afc8d.tar.xz |
command: fix DVD angle cycling
It didn't wrap around when switching while the last angle is active.
Diffstat (limited to 'core')
-rw-r--r-- | core/command.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/command.c b/core/command.c index 72d6f34469..d44521bf1c 100644 --- a/core/command.c +++ b/core/command.c @@ -471,6 +471,17 @@ static int mp_property_angle(m_option_t *prop, int action, void *arg, resync_audio_stream(sh_audio); } return M_PROPERTY_OK; + case M_PROPERTY_GET_TYPE: { + struct m_option opt = { + .name = prop->name, + .type = CONF_TYPE_INT, + .flags = CONF_RANGE, + .min = 1, + .max = angles, + }; + *(struct m_option *)arg = opt; + return M_PROPERTY_OK; + } } return M_PROPERTY_NOT_IMPLEMENTED; } @@ -1373,8 +1384,7 @@ static const m_option_t mp_properties[] = { { "chapters", mp_property_chapters, CONF_TYPE_INT, 0, 0, 0, NULL }, { "editions", mp_property_editions, CONF_TYPE_INT }, - { "angle", mp_property_angle, CONF_TYPE_INT, - CONF_RANGE, -2, 10, NULL }, + { "angle", mp_property_angle, &m_option_type_dummy }, { "metadata", mp_property_metadata, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL }, M_OPTION_PROPERTY_CUSTOM("pause", mp_property_pause), |