+2008-04-03 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * plugins/indexers/gstfileindex.c: (_file_index_id_free),
+ (gst_file_index_load), (gst_file_index_add_id),
+ (gst_file_index_get_assoc_entry):
+ * plugins/indexers/gstmemindex.c: (gst_mem_index_free_format),
+ (gst_mem_index_free_id), (gst_mem_index_add_id),
+ (gst_mem_index_index_format):
+ Use GSlice when possible.
+
2008-04-02 Sebastian Dröge <slomo@circular-chaos.org>
* libs/gst/controller/gstinterpolationcontrolsource.c:
munmap (index_id->array->data, ARRAY_TOTAL_SIZE (index_id));
g_array_free (index_id->array, !is_mmapped);
}
- g_free (index_id);
+ g_slice_free (GstFileIndexId, index_id);
}
static gboolean
continue;
}
- id_index = g_new0 (GstFileIndexId, 1);
+ id_index = g_slice_new0 (GstFileIndexId);
id_index->id_desc = (char *) xmlGetProp (writer, (xmlChar *) "id");
for (wpart = writer->children; wpart; wpart = wpart->next) {
id_index = g_hash_table_lookup (fileindex->id_index, &entry->id);
if (!id_index) {
- id_index = g_new0 (GstFileIndexId, 1);
+ id_index = g_slice_new0 (GstFileIndexId);
id_index->id = entry->id;
id_index->id_desc = g_strdup (entry->data.id.description);
/* entry memory management needs improvement FIXME */
if (!fileindex->ret_entry)
- fileindex->ret_entry = g_new0 (GstIndexEntry, 1);
+ fileindex->ret_entry = g_slice_new0 (GstIndexEntry);
entry = fileindex->ret_entry;
if (entry->data.assoc.assocs) {
g_free (entry->data.assoc.assocs);
g_tree_destroy (index->tree);
}
- g_free (index);
+ g_slice_free (GstMemIndexFormatIndex, index);
}
static void
id_index->format_index = NULL;
}
- g_free (id_index);
+ g_slice_free (GstMemIndexId, id_index);
}
static void
id_index = g_hash_table_lookup (memindex->id_index, &entry->id);
if (!id_index) {
- id_index = g_new0 (GstMemIndexId, 1);
+ id_index = g_slice_new0 (GstMemIndexId);
id_index->id = entry->id;
id_index->format_index = g_hash_table_new (g_int_hash, g_int_equal);
index = g_hash_table_lookup (id_index->format_index, format);
if (!index) {
- index = g_new0 (GstMemIndexFormatIndex, 1);
+ index = g_slice_new0 (GstMemIndexFormatIndex);
index->format = *format;
index->offset = assoc;