}
if (logfile) gf_fclose(logfile);
gf_sys_close();
+
+#ifdef GPAC_MEMORY_TRACKING
+ if (mem_track && (gf_memory_size() || gf_file_handles_count() )) {
+ gf_log_set_tool_level(GF_LOG_MEMORY, GF_LOG_INFO);
+ gf_memory_print();
+ }
+#endif
+
return ret_code;
}
for (i=0; i<ptr->entry_count; i++) {
GF_AfraEntry *ae = gf_malloc(sizeof(GF_AfraEntry));
if (!ae) return GF_OUT_OF_MEM;
+ gf_list_insert(ptr->local_access_entries, ae, i);
ISOM_DECREASE_SIZE(ptr, 8)
ae->time = gf_bs_read_u64(bs);
ISOM_DECREASE_SIZE(ptr, 4)
ae->offset = gf_bs_read_u32(bs);
}
-
- gf_list_insert(ptr->local_access_entries, ae, i);
}
if (ptr->global_entries) {
for (i=0; i<ptr->global_entry_count; i++) {
GF_GlobalAfraEntry *ae = gf_malloc(sizeof(GF_GlobalAfraEntry));
if (!ae) return GF_OUT_OF_MEM;
+ gf_list_insert(ptr->global_access_entries, ae, i);
+
ISOM_DECREASE_SIZE(ptr, 8)
ae->time = gf_bs_read_u64(bs);
if (ptr->long_ids) {
ae->afra_offset = gf_bs_read_u32(bs);
ae->offset_from_afra = gf_bs_read_u32(bs);
}
-
- gf_list_insert(ptr->global_access_entries, ae, i);
}
}