diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-05-20 01:26:38 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-07-16 21:08:42 +0300 |
commit | 48f0692ab973448de5faa323478d1cba3d42e2af (patch) | |
tree | 0d00001f5ad9f04e64613c9759c38be5c80b9f10 /m_struct.c | |
parent | dc2a4863af9b0e587ac4ec3e2096639098e99a8f (diff) | |
download | mpv-48f0692ab973448de5faa323478d1cba3d42e2af.tar.bz2 mpv-48f0692ab973448de5faa323478d1cba3d42e2af.tar.xz |
options: make option struct the talloc parent of options
Allocate dynamically-allocated option values as talloc children of the
option struct. This will allow implementing per-object (VO etc)
options so that simply freeing the object will free associated options
too.
This doesn't change quite every allocation in m_option.c, but the
exceptions are legacy types which will not matter for new per-object
options.
Diffstat (limited to 'm_struct.c')
-rw-r--r-- | m_struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/m_struct.c b/m_struct.c index 8b34cea359..6e32bf32c8 100644 --- a/m_struct.c +++ b/m_struct.c @@ -71,7 +71,7 @@ int m_struct_set(const m_struct_t *st, void *obj, const char *field, return 0; } - if(f->type->parse(f, bstr(field), param, false, M_ST_MB_P(obj,f->p)) < 0) { + if(f->type->parse(f, bstr(field), param, false, M_ST_MB_P(obj,f->p), NULL) < 0) { mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Struct %s, field %s parsing error: %.*s\n", st->name, field, BSTR_P(param)); return 0; |