Revert "m_option: deprecate setting -1 to --video-aspect-override"
This reverts commit 18257375e4.
This commit is contained in:
1 parent
184ace21a0
commit
704f995c49
3 files changed
+2
-12
No files matched your search
@@ -1,2 +1 @@
|
||||
change the underlying type of the `aspect`, `par`, and `sar` sub-properties to double from float
|
||||
deprecate setting `--video-aspect-override` to `-1` in favor of the newly added `original` choice
|
||||
@@ -1585,7 +1585,7 @@ Video
|
||||
the window, while ``--video-zoom`` can zoom in or out arbitrary amounts, and
|
||||
also works with ``--video-unscaled``.
|
||||
|
||||
``--video-aspect-override=<ratio|no|original>``
|
||||
``--video-aspect-override=<ratio|no>``
|
||||
Override video aspect ratio, in case aspect information is incorrect or
|
||||
missing in the file being played.
|
||||
|
||||
@@ -1593,8 +1593,7 @@ Video
|
||||
|
||||
:0: disable aspect ratio handling, pretend the video has square pixels
|
||||
:no: same as ``0``
|
||||
:original: use the video stream or container aspect (default)
|
||||
:-1: same as ``1`` (deprecated)
|
||||
:-1: use the video stream or container aspect (default)
|
||||
|
||||
But note that handling of these special values might change in the future.
|
||||
|
||||
|
||||
@@ -1119,20 +1119,12 @@ static int parse_double_aspect(struct mp_log *log, const m_option_t *opt,
|
||||
|
||||
// Potentially allow -1 but forbid all other negative values.
|
||||
if (opt->defval && *(double *)opt->defval == -1) {
|
||||
if (bstr_equals0(param, "original")) {
|
||||
if (dst)
|
||||
VAL(dst) = -1.0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct bstr rest;
|
||||
double val = bstrtod(param, &rest);
|
||||
if (bstr_eatstart0(&rest, ":") || bstr_eatstart0(&rest, "/"))
|
||||
val /= bstrtod(rest, &rest);
|
||||
if (val == -1 && dst) {
|
||||
VAL(dst) = -1.0;
|
||||
mp_warn(log, "Setting '%.*s' to '%.*s' is deprecated. "
|
||||
"Set 'original' instead.\n", BSTR_P(param), BSTR_P(name));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user