Commit e1b5c1e8 authored by j45's avatar j45

forgot to free chap_list and mark_list in nav_title_close

and forgot to set mark_list count
parent 33fd99e1
......@@ -137,6 +137,7 @@ NAV_TITLE_LIST* nav_get_title_list(char *root, uint32_t flags)
pl_list_size += 100;
tmp = realloc(pl_list, pl_list_size * sizeof(MPLS_PL*));
if (tmp == NULL) {
X_FREE(path);
break;
}
pl_list = tmp;
......@@ -224,6 +225,7 @@ char* nav_find_main_title(char *root)
pl_list_size += 100;
tmp = realloc(pl_list, pl_list_size * sizeof(MPLS_PL*));
if (tmp == NULL) {
X_FREE(path);
break;
}
pl_list = tmp;
......@@ -425,6 +427,7 @@ NAV_TITLE* nav_title_open(char *root, char *playlist)
}
title->chap_list.count = chapters;
title->chap_list.mark = calloc(chapters, sizeof(NAV_MARK));
title->mark_list.count = title->pl->mark_count;
title->mark_list.mark = calloc(title->pl->mark_count, sizeof(NAV_MARK));
_extrapolate_title(title);
......@@ -441,6 +444,8 @@ void nav_title_close(NAV_TITLE *title)
}
X_FREE(title->clip_list.clip);
X_FREE(title->root);
X_FREE(title->chap_list.mark);
X_FREE(title->mark_list.mark);
X_FREE(title);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment