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
@ -116,9 +116,6 @@ void
|
|||||||
_priv_gst_registry_chunk_free (GstRegistryChunk * chunk)
|
_priv_gst_registry_chunk_free (GstRegistryChunk * chunk)
|
||||||
{
|
{
|
||||||
if (!(chunk->flags & GST_REGISTRY_CHUNK_FLAG_CONST)) {
|
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);
|
g_free (chunk);
|
||||||
@ -165,7 +162,7 @@ gst_registry_chunks_save_string (GList ** list, gchar * str)
|
|||||||
chunk = g_new (GstRegistryChunk, 1);
|
chunk = g_new (GstRegistryChunk, 1);
|
||||||
chunk->data = str;
|
chunk->data = str;
|
||||||
chunk->size = strlen ((gchar *) chunk->data) + 1;
|
chunk->size = strlen ((gchar *) chunk->data) + 1;
|
||||||
chunk->flags = GST_REGISTRY_CHUNK_FLAG_MALLOC;
|
chunk->flags = GST_REGISTRY_CHUNK_FLAG_NONE;
|
||||||
chunk->align = FALSE;
|
chunk->align = FALSE;
|
||||||
*list = g_list_prepend (*list, chunk);
|
*list = g_list_prepend (*list, chunk);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -28,13 +28,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* we reference strings directly from the plugins and in this case set CONST to
|
* 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,
|
* avoid freeing them.
|
||||||
* otherwise g_free() will also be used. (FIXME: don't need MALLOC flag any more)
|
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
GST_REGISTRY_CHUNK_FLAG_NONE = 0,
|
GST_REGISTRY_CHUNK_FLAG_NONE = 0,
|
||||||
GST_REGISTRY_CHUNK_FLAG_CONST = 1,
|
GST_REGISTRY_CHUNK_FLAG_CONST = 1,
|
||||||
GST_REGISTRY_CHUNK_FLAG_MALLOC = 2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user