summaryrefslogtreecommitdiffstats
path: root/mpvcore/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-26 16:53:17 +0200
committerwm4 <wm4@nowhere>2013-09-26 17:29:14 +0200
commit9a55c4e70cebe6da6b7c7796119f84c4c9ad2a60 (patch)
tree2b998cc92f0b0d091cc48051cb3cfebff8370837 /mpvcore/options.c
parentf5bf6c0fb33fb6ff11f3250de708eb6e658772c9 (diff)
downloadmpv-9a55c4e70cebe6da6b7c7796119f84c4c9ad2a60.tar.bz2
mpv-9a55c4e70cebe6da6b7c7796119f84c4c9ad2a60.tar.xz
video: let sh_video->aspect always be container aspect ratio
Now writing -1 to the 'aspect' property resets the video to the auto aspect ratio. Returning the aspect from the property becomes a bit more complicated, because we still try to return the container aspect ratio if no frame has been decoded yet.
Diffstat (limited to 'mpvcore/options.c')
-rw-r--r--mpvcore/options.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mpvcore/options.c b/mpvcore/options.c
index d73faa1cbe..9cffb07284 100644
--- a/mpvcore/options.c
+++ b/mpvcore/options.c
@@ -497,8 +497,10 @@ const m_option_t mp_opts[] = {
// scaling:
{"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
{"ssf", (void *) scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
- OPT_FLOATRANGE("aspect", movie_aspect, 0, 0.1, 10.0),
- OPT_FLOAT_STORE("no-aspect", movie_aspect, 0, 0),
+ // -1 means auto aspect (prefer container size until aspect change)
+ // 0 means square pixels
+ OPT_FLOATRANGE("aspect", movie_aspect, 0, -1.0, 10.0),
+ OPT_FLOAT_STORE("no-aspect", movie_aspect, 0, 0.0),
OPT_FLAG_CONSTANTS("flip", flip, 0, 0, 1),