mirror of
https://github.com/mpv-player/mpv
synced 2025-01-21 23:23:19 +00:00
a few 10l fixes by Wei Jiang <jiangw98@yahoo.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13825 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2b66a6e2be
commit
e43bf450f5
@ -32,7 +32,10 @@ m_config_free(m_config_t* config) {
|
||||
#endif
|
||||
|
||||
while(i) {
|
||||
sl = i->slots;
|
||||
if (i->flags & M_CFG_OPT_ALIAS)
|
||||
sl = NULL;
|
||||
else
|
||||
sl = i->slots;
|
||||
while(sl) {
|
||||
m_option_free(i->opt,sl->data);
|
||||
st = sl->prev;
|
||||
@ -43,7 +46,7 @@ m_config_free(m_config_t* config) {
|
||||
free(i->name);
|
||||
ct = i->next;
|
||||
free(i);
|
||||
ct = i;
|
||||
i = ct;
|
||||
}
|
||||
free(config);
|
||||
}
|
||||
@ -149,6 +152,7 @@ m_config_add_option(m_config_t *config, m_option_t *arg, char* prefix) {
|
||||
if(arg->type->flags & M_OPT_TYPE_HAS_CHILD) {
|
||||
m_option_t *ol = arg->p;
|
||||
int i;
|
||||
co->slots = NULL;
|
||||
for(i = 0 ; ol[i].name != NULL ; i++)
|
||||
m_config_add_option(config,&ol[i], co->name);
|
||||
} else {
|
||||
@ -174,6 +178,7 @@ m_config_add_option(m_config_t *config, m_option_t *arg, char* prefix) {
|
||||
m_option_set(arg,arg->p,sl->data);
|
||||
}
|
||||
sl->lvl = 0;
|
||||
sl->prev = NULL;
|
||||
co->slots = (m_config_save_slot_t*)calloc(1,sizeof(m_config_save_slot_t) + arg->type->size);
|
||||
co->slots->prev = sl;
|
||||
co->slots->lvl = config->lvl;
|
||||
|
Loading…
Reference in New Issue
Block a user