diff options
author | wm4 <wm4@nowhere> | 2019-10-25 00:25:05 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-10-25 15:06:04 +0200 |
commit | 419c44ccf6cc522cd69be0a905d8c6f46e528aca (patch) | |
tree | 0f76b79e976224298f7b9b9ade4fad32595b0112 /libmpv | |
parent | 922be711018cab55551c26fc757b7566c11602cb (diff) | |
download | mpv-419c44ccf6cc522cd69be0a905d8c6f46e528aca.tar.bz2 mpv-419c44ccf6cc522cd69be0a905d8c6f46e528aca.tar.xz |
vo_gpu, options: don't return NaN through API
Internally, vo_gpu uses NaN for some options to indicate a default value
that is different depending on the context (e.g. different scalers).
There are 2 problems with this:
1. you couldn't reset the options to their defaults
2. NaN is a damn mess and shouldn't be part of the API
The option parser already rejected NaN explicitly, which is why 1.
didn't work. Regarding 2., JSON might be a good example, and actually
caused a bug report.
Fix this by mapping NaN to the special value "default". I think I'd
prefer other mechanisms (maybe just having every scaler expose separate
options?), but for now this will do. See you in a future commit, which
painfully deprecates this and replaces it with something else.
I refrained from using "no" (my favorite magic value for "unset" etc.)
because then I'd have e.g. make --no-scale-param1 work, which in
addition to a lot of effort looks dumb and nobody will use it.
Here's also an apology for the shitty added test script.
Fixes: #6691
Diffstat (limited to 'libmpv')
0 files changed, 0 insertions, 0 deletions