mpv/options
wm4 41e96d8b6b options: fix OPT_BYTE_SIZE upper limits
As an unfortunate disaster, min/max values use the type double, which
causes tons of issues with int64_t types. Anyway, OPT_BYTE_SIZE is often
used as maximum for size_t quantities, which can have a size different
from (u)int64_t.

OPT_BYTE_SIZE still uses in64_t, because in theory, you could use it for
file sizes. (demux.c would for example be capable of caching more than
2GB on 32 bit platforms if a file cache is used. Though for some reason
the accounting code still uses size_t, so that use case is broken. But
still insist that it _could_ be used this way.)

There were various inconsistent attempts to set m_option.max to a value
such that the size_t/int64_t upper limit is not exceeded. Due to the
double max field, this didn't really work correctly. Try to fix this
with the M_MAX_MEM_BYTES constant. It's a good approximation, because on
32 bit it should allow 2GB (untested, also would probably exhaust
address space in practice but whatever), and something "high enough" in
64 bit.

For some reason, clang 11 still warns. But I think this might be a clang
bug, or I'm crazy. The result is correct anyway.
2020-03-18 20:51:38 +01:00
..
m_config.h options: split m_config.c/h 2020-03-13 16:50:27 +01:00
m_config_core.c options: more pushing code around 2020-03-13 16:50:27 +01:00
m_config_core.h options: more pushing code around 2020-03-13 16:50:27 +01:00
m_config_frontend.c options: change how option range min/max is handled 2020-03-13 17:34:46 +01:00
m_config_frontend.h options: more pushing code around 2020-03-13 16:50:27 +01:00
m_option.c m_option: attempt to fix two rounding issues 2020-03-18 20:19:13 +01:00
m_option.h options: fix OPT_BYTE_SIZE upper limits 2020-03-18 20:51:38 +01:00
m_property.c command: disable edition switching if there are no editions 2020-03-14 01:32:27 +01:00
m_property.h command: move property multiply code to m_property.c 2018-03-26 19:47:08 +02:00
options.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
options.h options: introduce bool option type, use it for --fullscreen 2020-03-14 02:23:38 +01:00
parse_commandline.c options: split m_config.c/h 2020-03-13 16:50:27 +01:00
parse_commandline.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
parse_configfile.c options: change license of most files to LGPL (except options.c/.h) 2017-06-12 20:55:17 +02:00
parse_configfile.h options: split m_config.c/h 2020-03-13 16:50:27 +01:00
path.c path: add mp_path_is_absolute() 2020-02-06 14:14:35 +01:00
path.h path: add mp_path_is_absolute() 2020-02-06 14:14:35 +01:00