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 @@
1change the underlying type of the `aspect`, `par`, and `sar` sub-properties to double from float1change the underlying type of the `aspect`, `par`, and `sar` sub-properties to double from float
2deprecate 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
1585 the window, while ``--video-zoom`` can zoom in or out arbitrary amounts, and1585 the window, while ``--video-zoom`` can zoom in or out arbitrary amounts, and
1586 also works with ``--video-unscaled``.1586 also works with ``--video-unscaled``.
1587 1587
1588``--video-aspect-override=<ratio|no|original>``1588``--video-aspect-override=<ratio|no>``
1589 Override video aspect ratio, in case aspect information is incorrect or1589 Override video aspect ratio, in case aspect information is incorrect or
1590 missing in the file being played.1590 missing in the file being played.
1591 1591
@@ -1593,8 +1593,7 @@ Video · 1 unmodified line
1593 1593
1594 :0: disable aspect ratio handling, pretend the video has square pixels1594 :0: disable aspect ratio handling, pretend the video has square pixels
1595 :no: same as ``0``1595 :no: same as ``0``
1596 :original: use the video stream or container aspect (default)1596 :-1: use the video stream or container aspect (default)
1597 :-1: same as ``1`` (deprecated)
1598 1597
1599 But note that handling of these special values might change in the future.1598 But note that handling of these special values might change in the future.
1600 1599
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
1119 1119
1120 // Potentially allow -1 but forbid all other negative values.1120 // Potentially allow -1 but forbid all other negative values.
1121 if (opt->defval && *(double *)opt->defval == -1) {1121 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
1128 struct bstr rest;1122 struct bstr rest;
1129 double val = bstrtod(param, &rest);1123 double val = bstrtod(param, &rest);
1130 if (bstr_eatstart0(&rest, ":") || bstr_eatstart0(&rest, "/"))1124 if (bstr_eatstart0(&rest, ":") || bstr_eatstart0(&rest, "/"))
1131 val /= bstrtod(rest, &rest);1125 val /= bstrtod(rest, &rest);
1132 if (val == -1 && dst) {1126 if (val == -1 && dst) {
1133 VAL(dst) = -1.0;1127 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));
1136 return 1;1128 return 1;
1137 }1129 }
1138 }1130 }

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