summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-18 12:10:22 +0200
committerwm4 <wm4@nowhere>2016-09-18 16:08:21 +0200
commit62d4a3891a152253a91f2054dd7b24c1aa5d285f (patch)
tree307b94058832be2782707ec0c2ba48f8fcc052be /player/command.c
parent79e20ff485db4ee82e7b475a5329bf303570cde6 (diff)
downloadmpv-62d4a3891a152253a91f2054dd7b24c1aa5d285f.tar.bz2
mpv-62d4a3891a152253a91f2054dd7b24c1aa5d285f.tar.xz
command: minor fixes to video-aspect property
Make the option type exactly the same as the underlying option's one. I think this has no user-visible consequences, but makes more sense for the option-property bridge.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/player/command.c b/player/command.c
index 7b77097011..013e303ffe 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2959,7 +2959,7 @@ static int mp_property_aspect(void *ctx, struct m_property *prop,
return M_PROPERTY_OK;
}
case M_PROPERTY_PRINT: {
- if (mpctx->opts->movie_aspect <= 0) {
+ if (mpctx->opts->movie_aspect < 0) {
*(char **)arg = talloc_asprintf(NULL, "%.3f (original)", aspect);
return M_PROPERTY_OK;
}
@@ -2970,13 +2970,7 @@ static int mp_property_aspect(void *ctx, struct m_property *prop,
return M_PROPERTY_OK;
}
case M_PROPERTY_GET_TYPE:
- *(struct m_option *)arg = (struct m_option){
- .type = CONF_TYPE_FLOAT,
- .flags = CONF_RANGE,
- .min = -1,
- .max = 10,
- };
- return M_PROPERTY_OK;
+ return mp_property_generic_option(mpctx, prop, action, arg);
}
return M_PROPERTY_NOT_IMPLEMENTED;
}