History

Revert "m_option: deprecate setting -1 to --video-aspect-override"

This reverts commit 18257375e4bbfdb755f5dac5e82cc0da67de12f9.

nanahi committed 1 year ago

Commit 704f9951 parent 184ace23 files · +2 −12Browse files

Unified · Split

3 files
  1. DOCS/interface-changes/aspect-properties.txt +0 −1
  2. DOCS/man/options.rst +2 −3
  3. options/m_option.c +0 −8
DOCS/interface-changes/aspect-properties.txt+0−1
@@ -1,2 +1 @@
11 change the underlying type of the `aspect`, `par`, and `sar` sub-properties to double from float
2−deprecate setting `--video-aspect-override` to `-1` in favor of the newly added `original` choice
DOCS/man/options.rst+2−3
@@ -1585,7 +1585,7 @@ Video · 1584 unmodified lines
15851585 the window, while ``--video-zoom`` can zoom in or out arbitrary amounts, and
15861586 also works with ``--video-unscaled``.
15871587
1588−``--video-aspect-override=<ratio|no|original>``
1588+``--video-aspect-override=<ratio|no>``
15891589 Override video aspect ratio, in case aspect information is incorrect or
15901590 missing in the file being played.
15911591
@@ -1593,8 +1593,7 @@ Video · 1 unmodified line
15931593
15941594 :0: disable aspect ratio handling, pretend the video has square pixels
15951595 :no: same as ``0``
1596− :original: use the video stream or container aspect (default)
1597− :-1: same as ``1`` (deprecated)
1596+ :-1: use the video stream or container aspect (default)
15981597
15991598 But note that handling of these special values might change in the future.
16001599
options/m_option.c+0−8
@@ -1119,20 +1119,12 @@ static int parse_double_aspect(struct mp_log *log, const m_option_t *opt, · 1118 unmodified lines
11191119
11201120 // Potentially allow -1 but forbid all other negative values.
11211121 if (opt->defval && *(double *)opt->defval == -1) {
1122− if (bstr_equals0(param, "original")) {
1123− if (dst)
1124− VAL(dst) = -1.0;
1125− return 1;
1126− }
1127−
11281122 struct bstr rest;
11291123 double val = bstrtod(param, &rest);
11301124 if (bstr_eatstart0(&rest, ":") || bstr_eatstart0(&rest, "/"))
11311125 val /= bstrtod(rest, &rest);
11321126 if (val == -1 && dst) {
11331127 VAL(dst) = -1.0;
1134− mp_warn(log, "Setting '%.*s' to '%.*s' is deprecated. "
1135− "Set 'original' instead.\n", BSTR_P(param), BSTR_P(name));
11361128 return 1;
11371129 }
11381130 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t