mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
bufferlist: no need to store the size of the structure inside the structure
This commit is contained in:
parent
463268b21f
commit
b4a9a2f79e
1 changed files with 3 additions and 7 deletions
|
@ -54,8 +54,6 @@ struct _GstBufferList
|
|||
{
|
||||
GstMiniObject mini_object;
|
||||
|
||||
gsize slice_size;
|
||||
|
||||
GArray *array;
|
||||
};
|
||||
|
||||
|
@ -99,19 +97,17 @@ _gst_buffer_list_free (GstBufferList * list)
|
|||
gst_buffer_unref (g_array_index (list->array, GstBuffer *, i));
|
||||
g_array_free (list->array, TRUE);
|
||||
|
||||
g_slice_free1 (list->slice_size, list);
|
||||
g_slice_free1 (sizeof (GstBufferList), list);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_buffer_list_init (GstBufferList * list, gsize size, guint asize)
|
||||
gst_buffer_list_init (GstBufferList * list, guint asize)
|
||||
{
|
||||
gst_mini_object_init (GST_MINI_OBJECT_CAST (list), _gst_buffer_list_type);
|
||||
|
||||
list->mini_object.copy = (GstMiniObjectCopyFunction) _gst_buffer_list_copy;
|
||||
list->mini_object.free = (GstMiniObjectFreeFunction) _gst_buffer_list_free;
|
||||
|
||||
list->slice_size = size;
|
||||
|
||||
list->array = g_array_sized_new (FALSE, FALSE, sizeof (GstBuffer *), asize);
|
||||
|
||||
GST_LOG ("init %p", list);
|
||||
|
@ -141,7 +137,7 @@ gst_buffer_list_new_sized (guint size)
|
|||
|
||||
GST_LOG ("new %p", list);
|
||||
|
||||
gst_buffer_list_init (list, sizeof (GstBufferList), size);
|
||||
gst_buffer_list_init (list, size);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue