1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-21 07:10:52 +00:00
mpv/options
wm4 1d3b680427 options: simplify mp_get_config_group() memory management
There is some craziness here: the function allocates m_config_cache,
which in turn allocates the actual option struct, which is what the
function returns. The user would expect to be able to use talloc_free()
to deallocate everything. Of course this didn't work, because the
returned pointer is not the root parent in the talloc tree.

But with some additional talloc craziness, this can be fixed. We
rearrange the parent pointers such that freeing the option struct will
free m_config_cache first, which uninits the contents in the option
struct, but fortunately not the option struct itself.

This change should simplify API use on the caller side, and reduce
surprises.
2018-01-18 00:59:07 -08:00
..
m_config.c options: simplify mp_get_config_group() memory management 2018-01-18 00:59:07 -08:00
m_config.h options: simplify mp_get_config_group() memory management 2018-01-18 00:59:07 -08:00
m_option.c m_option: add print callback to start/end/length 2018-01-03 15:10:25 -08:00
m_option.h audio: add global options for resampler defaults 2018-01-13 03:26:45 -08:00
m_property.c
m_property.h command: read the diff if you want to know 2017-10-21 21:13:53 +02:00
options.c options: deprecate --vf-defaults and --af-defaults 2018-01-13 03:26:45 -08:00
options.h audio: add global options for resampler defaults 2018-01-13 03:26:45 -08:00
parse_commandline.c m_option: remove redundant indirections 2017-07-02 13:07:36 +02:00
parse_commandline.h options: change license of most files to LGPL (except options.c/.h) 2017-06-12 20:55:17 +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: change license of most files to LGPL (except options.c/.h) 2017-06-12 20:55:17 +02:00
path.c msg: reinterpret a bunch of message levels 2017-12-15 22:28:47 -08:00
path.h