mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
tag: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
58722ba48e
commit
df83590008
3 changed files with 11 additions and 11 deletions
|
@ -480,7 +480,7 @@ gst_exif_reader_add_pending_tag (GstExifReader * reader, GstExifTagData * data)
|
||||||
{
|
{
|
||||||
GstExifTagData *copy;
|
GstExifTagData *copy;
|
||||||
|
|
||||||
copy = g_slice_new (GstExifTagData);
|
copy = g_new (GstExifTagData, 1);
|
||||||
memcpy (copy, data, sizeof (GstExifTagData));
|
memcpy (copy, data, sizeof (GstExifTagData));
|
||||||
|
|
||||||
reader->pending_tags = g_slist_prepend (reader->pending_tags, copy);
|
reader->pending_tags = g_slist_prepend (reader->pending_tags, copy);
|
||||||
|
@ -509,7 +509,7 @@ gst_exif_reader_reset (GstExifReader * reader, gboolean return_taglist)
|
||||||
for (walker = reader->pending_tags; walker; walker = g_slist_next (walker)) {
|
for (walker = reader->pending_tags; walker; walker = g_slist_next (walker)) {
|
||||||
GstExifTagData *data = (GstExifTagData *) walker->data;
|
GstExifTagData *data = (GstExifTagData *) walker->data;
|
||||||
|
|
||||||
g_slice_free (GstExifTagData, data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
g_slist_free (reader->pending_tags);
|
g_slist_free (reader->pending_tags);
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ gst_xmp_tag_create (const gchar * gst_tag, const gchar * xmp_tag,
|
||||||
{
|
{
|
||||||
XmpTag *xmpinfo;
|
XmpTag *xmpinfo;
|
||||||
|
|
||||||
xmpinfo = g_slice_new (XmpTag);
|
xmpinfo = g_new (XmpTag, 1);
|
||||||
xmpinfo->gst_tag = gst_tag;
|
xmpinfo->gst_tag = gst_tag;
|
||||||
xmpinfo->tag_name = xmp_tag;
|
xmpinfo->tag_name = xmp_tag;
|
||||||
xmpinfo->type = xmp_type;
|
xmpinfo->type = xmp_type;
|
||||||
|
@ -653,7 +653,7 @@ deserialize_exif_altitude (XmpTag * xmptag, GstTagList * taglist,
|
||||||
|
|
||||||
/* clean up entry */
|
/* clean up entry */
|
||||||
g_free (ptag->str);
|
g_free (ptag->str);
|
||||||
g_slice_free (PendingXmpTag, ptag);
|
g_free (ptag);
|
||||||
*pending_tags = g_slist_delete_link (*pending_tags, entry);
|
*pending_tags = g_slist_delete_link (*pending_tags, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ deserialize_exif_gps_speed (XmpTag * xmptag, GstTagList * taglist,
|
||||||
|
|
||||||
/* clean up entry */
|
/* clean up entry */
|
||||||
g_free (ptag->str);
|
g_free (ptag->str);
|
||||||
g_slice_free (PendingXmpTag, ptag);
|
g_free (ptag);
|
||||||
*pending_tags = g_slist_delete_link (*pending_tags, entry);
|
*pending_tags = g_slist_delete_link (*pending_tags, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -842,7 +842,7 @@ deserialize_exif_gps_direction (XmpTag * xmptag, GstTagList * taglist,
|
||||||
|
|
||||||
/* clean up entry */
|
/* clean up entry */
|
||||||
g_free (ptag->str);
|
g_free (ptag->str);
|
||||||
g_slice_free (PendingXmpTag, ptag);
|
g_free (ptag);
|
||||||
*pending_tags = g_slist_delete_link (*pending_tags, entry);
|
*pending_tags = g_slist_delete_link (*pending_tags, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1356,7 +1356,7 @@ gst_tag_list_from_xmp_buffer (GstBuffer * buffer)
|
||||||
/* we shouldn't find a xmp structure here */
|
/* we shouldn't find a xmp structure here */
|
||||||
g_assert (xmp_tag->gst_tag != NULL);
|
g_assert (xmp_tag->gst_tag != NULL);
|
||||||
|
|
||||||
ptag = g_slice_new (PendingXmpTag);
|
ptag = g_new (PendingXmpTag, 1);
|
||||||
ptag->xmp_tag = xmp_tag;
|
ptag->xmp_tag = xmp_tag;
|
||||||
ptag->str = g_strdup (v);
|
ptag->str = g_strdup (v);
|
||||||
|
|
||||||
|
@ -1449,7 +1449,7 @@ gst_tag_list_from_xmp_buffer (GstBuffer * buffer)
|
||||||
|
|
||||||
context_tag = last_xmp_tag;
|
context_tag = last_xmp_tag;
|
||||||
} else {
|
} else {
|
||||||
ptag = g_slice_new (PendingXmpTag);
|
ptag = g_new (PendingXmpTag, 1);
|
||||||
ptag->xmp_tag = last_xmp_tag;
|
ptag->xmp_tag = last_xmp_tag;
|
||||||
ptag->str = g_strdup (part);
|
ptag->str = g_strdup (part);
|
||||||
|
|
||||||
|
@ -1476,7 +1476,7 @@ gst_tag_list_from_xmp_buffer (GstBuffer * buffer)
|
||||||
read_one_tag (list, ptag->xmp_tag, ptag->str, &pending_tags);
|
read_one_tag (list, ptag->xmp_tag, ptag->str, &pending_tags);
|
||||||
|
|
||||||
g_free (ptag->str);
|
g_free (ptag->str);
|
||||||
g_slice_free (PendingXmpTag, ptag);
|
g_free (ptag);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INFO ("xmp packet parsed, %d entries", gst_tag_list_n_tags (list));
|
GST_INFO ("xmp packet parsed, %d entries", gst_tag_list_n_tags (list));
|
||||||
|
|
|
@ -118,7 +118,7 @@ gst_tag_xmp_writer_data_free (gpointer p)
|
||||||
}
|
}
|
||||||
g_mutex_clear (&data->lock);
|
g_mutex_clear (&data->lock);
|
||||||
|
|
||||||
g_slice_free (GstTagXmpWriterData, data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstTagXmpWriterData *
|
static GstTagXmpWriterData *
|
||||||
|
@ -135,7 +135,7 @@ gst_tag_xmp_writer_get_data (GstTagXmpWriter * xmpconfig)
|
||||||
|
|
||||||
data = g_object_get_qdata (G_OBJECT (xmpconfig), tag_xmp_writer_key);
|
data = g_object_get_qdata (G_OBJECT (xmpconfig), tag_xmp_writer_key);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = g_slice_new (GstTagXmpWriterData);
|
data = g_new (GstTagXmpWriterData, 1);
|
||||||
|
|
||||||
g_mutex_init (&data->lock);
|
g_mutex_init (&data->lock);
|
||||||
data->schemas = NULL;
|
data->schemas = NULL;
|
||||||
|
|
Loading…
Reference in a new issue