mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
registrychunks: get rid of internal GST_REGISTRY_CHUNK_FLAG_MALLOC
Not actually needed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
ade83c8355
commit
9e71898337
2 changed files with 3 additions and 8 deletions
|
@ -116,10 +116,7 @@ void
|
|||
_priv_gst_registry_chunk_free (GstRegistryChunk * chunk)
|
||||
{
|
||||
if (!(chunk->flags & GST_REGISTRY_CHUNK_FLAG_CONST)) {
|
||||
if ((chunk->flags & GST_REGISTRY_CHUNK_FLAG_MALLOC))
|
||||
g_free (chunk->data);
|
||||
else
|
||||
g_free (chunk->data);
|
||||
g_free (chunk->data);
|
||||
}
|
||||
g_free (chunk);
|
||||
}
|
||||
|
@ -165,7 +162,7 @@ gst_registry_chunks_save_string (GList ** list, gchar * str)
|
|||
chunk = g_new (GstRegistryChunk, 1);
|
||||
chunk->data = str;
|
||||
chunk->size = strlen ((gchar *) chunk->data) + 1;
|
||||
chunk->flags = GST_REGISTRY_CHUNK_FLAG_MALLOC;
|
||||
chunk->flags = GST_REGISTRY_CHUNK_FLAG_NONE;
|
||||
chunk->align = FALSE;
|
||||
*list = g_list_prepend (*list, chunk);
|
||||
return TRUE;
|
||||
|
|
|
@ -28,13 +28,11 @@
|
|||
|
||||
/*
|
||||
* we reference strings directly from the plugins and in this case set CONST to
|
||||
* avoid freeing them. If g_free() should be used, the MALLOC flag is set,
|
||||
* otherwise g_free() will also be used. (FIXME: don't need MALLOC flag any more)
|
||||
* avoid freeing them.
|
||||
*/
|
||||
enum {
|
||||
GST_REGISTRY_CHUNK_FLAG_NONE = 0,
|
||||
GST_REGISTRY_CHUNK_FLAG_CONST = 1,
|
||||
GST_REGISTRY_CHUNK_FLAG_MALLOC = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue