mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
more leak fixes
This commit is contained in:
parent
6b19e7a2d8
commit
29e664ee21
2 changed files with 7 additions and 6 deletions
|
|
@ -362,9 +362,7 @@ gst_pinos_pay_chain_pinos (GstPinosPay *pay, GstBuffer * buffer)
|
||||||
GstMapInfo info;
|
GstMapInfo info;
|
||||||
PinosBuffer pbuf;
|
PinosBuffer pbuf;
|
||||||
PinosBufferIter it;
|
PinosBufferIter it;
|
||||||
GArray *fdids;
|
GArray *fdids = NULL;
|
||||||
|
|
||||||
fdids = g_array_new (FALSE, FALSE, sizeof (guint32));
|
|
||||||
|
|
||||||
gst_buffer_map (buffer, &info, GST_MAP_READ);
|
gst_buffer_map (buffer, &info, GST_MAP_READ);
|
||||||
pinos_buffer_init_data (&pbuf, info.data, info.size, NULL);
|
pinos_buffer_init_data (&pbuf, info.data, info.size, NULL);
|
||||||
|
|
@ -378,6 +376,9 @@ gst_pinos_pay_chain_pinos (GstPinosPay *pay, GstBuffer * buffer)
|
||||||
if (!pinos_buffer_iter_parse_fd_payload (&it, &p))
|
if (!pinos_buffer_iter_parse_fd_payload (&it, &p))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (fdids == NULL)
|
||||||
|
fdids = g_array_new (FALSE, FALSE, sizeof (guint32));
|
||||||
|
|
||||||
GST_LOG ("track fd index %d", p.id);
|
GST_LOG ("track fd index %d", p.id);
|
||||||
g_array_append_val (fdids, p.id);
|
g_array_append_val (fdids, p.id);
|
||||||
break;
|
break;
|
||||||
|
|
@ -389,7 +390,7 @@ gst_pinos_pay_chain_pinos (GstPinosPay *pay, GstBuffer * buffer)
|
||||||
gst_buffer_unmap (buffer, &info);
|
gst_buffer_unmap (buffer, &info);
|
||||||
pinos_buffer_clear (&pbuf);
|
pinos_buffer_clear (&pbuf);
|
||||||
|
|
||||||
if (fdids->len > 0) {
|
if (fdids != NULL) {
|
||||||
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (buffer),
|
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (buffer),
|
||||||
fdids_quark, fdids, NULL);
|
fdids_quark, fdids, NULL);
|
||||||
gst_mini_object_weak_ref (GST_MINI_OBJECT_CAST (buffer),
|
gst_mini_object_weak_ref (GST_MINI_OBJECT_CAST (buffer),
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ on_input_socket_notify (GObject *gobject,
|
||||||
/* and set as the current format */
|
/* and set as the current format */
|
||||||
caps = gst_caps_from_string (g_bytes_get_data (requested_format, NULL));
|
caps = gst_caps_from_string (g_bytes_get_data (requested_format, NULL));
|
||||||
g_assert (caps != NULL);
|
g_assert (caps != NULL);
|
||||||
gst_caps_replace (&priv->format, caps);
|
gst_caps_take (&priv->format, caps);
|
||||||
g_bytes_unref (requested_format);
|
g_bytes_unref (requested_format);
|
||||||
} else {
|
} else {
|
||||||
gst_caps_replace (&priv->format, NULL);
|
gst_caps_replace (&priv->format, NULL);
|
||||||
|
|
@ -405,7 +405,7 @@ pinos_client_source_get_source_input (PinosClientSource *source,
|
||||||
if (priv->input == NULL) {
|
if (priv->input == NULL) {
|
||||||
GstCaps *caps = gst_caps_from_string (g_bytes_get_data (format_filter, NULL));
|
GstCaps *caps = gst_caps_from_string (g_bytes_get_data (format_filter, NULL));
|
||||||
|
|
||||||
gst_caps_replace (&priv->format, caps);
|
gst_caps_take (&priv->format, caps);
|
||||||
|
|
||||||
priv->input = PINOS_SOURCE_CLASS (pinos_client_source_parent_class)
|
priv->input = PINOS_SOURCE_CLASS (pinos_client_source_parent_class)
|
||||||
->create_source_output (PINOS_SOURCE (source),
|
->create_source_output (PINOS_SOURCE (source),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue