mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
buffer: don't over-allocate internal GstMeta items
We would allocate space for two GstMeta structs even though there is only one in the end (the one in GstMetaItem and in GstFooMeta overlap).
This commit is contained in:
parent
b00b1d5361
commit
0691278377
1 changed files with 4 additions and 1 deletions
|
@ -140,7 +140,10 @@ struct _GstMetaItem
|
|||
GstMetaItem *next;
|
||||
GstMeta meta;
|
||||
};
|
||||
#define ITEM_SIZE(info) ((info)->size + sizeof (GstMetaItem))
|
||||
|
||||
/* info->size will be sizeof(FooMeta) which contains a GstMeta at the beginning
|
||||
* too, and then there is again a GstMeta in GstMetaItem, so subtract one. */
|
||||
#define ITEM_SIZE(info) ((info)->size + sizeof (GstMetaItem) - sizeof (GstMeta))
|
||||
|
||||
#define GST_BUFFER_MEM_MAX 16
|
||||
|
||||
|
|
Loading…
Reference in a new issue