main, gst-manager, pinos-monitor: plug leaks

This commit is contained in:
David Svensson Fors 2016-06-08 15:27:29 +02:00 committed by Wim Taymans
parent c9aaf71dc3
commit e8116fa68d
3 changed files with 10 additions and 5 deletions

View file

@ -43,6 +43,7 @@ main (gint argc, gchar *argv[])
g_main_loop_run (loop);
pinos_properties_free (props);
g_main_loop_unref (loop);
g_object_unref (daemon);

View file

@ -218,7 +218,7 @@ start_monitor (PinosGstManager *manager)
device_added (manager, device);
gst_object_unref (device);
devices = g_list_remove_link (devices, devices);
devices = g_list_delete_link (devices, devices);
}
}

View file

@ -37,22 +37,22 @@ print_field (GQuark field, const GValue * value, gpointer user_data)
static void
print_formats (const gchar *name, GBytes *formats, gchar mark)
{
GstCaps *caps;
GstCaps *caps = NULL;
guint i;
if (formats == NULL)
return;
goto done;
caps = gst_caps_from_string (g_bytes_get_data (formats, NULL));
g_print ("%c\t%s:\n", mark, name);
if (gst_caps_is_any (caps)) {
g_print ("%c\t\tANY\n", mark);
return;
goto done;
}
if (gst_caps_is_empty (caps)) {
g_print ("%c\t\tEMPTY\n", mark);
return;
goto done;
}
for (i = 0; i < gst_caps_get_size (caps); i++) {
GstStructure *structure = gst_caps_get_structure (caps, i);
@ -71,6 +71,10 @@ print_formats (const gchar *name, GBytes *formats, gchar mark)
}
gst_structure_foreach (structure, print_field, &mark);
}
done:
if (caps)
gst_caps_unref (caps);
}
static void