From 62d4a3891a152253a91f2054dd7b24c1aa5d285f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 18 Sep 2016 12:10:22 +0200 Subject: 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. --- player/command.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'player') 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; } -- cgit v1.2.3