for (f = features; f; f = f->next) {
GstPluginFeature *feature = f->data;
- const gchar *name = gst_plugin_feature_get_name (feature);
+ gchar *name;
gboolean ignore = FALSE;
if (!GST_IS_ELEMENT_FACTORY (feature))
continue;
+ name = gst_plugin_feature_get_name (feature);
+
if (ignorelist) {
gchar **s;
ignore = TRUE;
}
}
- if (ignore)
+ if (ignore) {
+ g_free (name);
continue;
+ }
}
GST_DEBUG ("adding element %s", name);
- elements = g_list_prepend (elements, (gpointer) g_strdup (name));
+ elements = g_list_prepend (elements, name);
}
gst_plugin_feature_list_free (features);
}
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL,
GST_CLOCK_TIME_NONE);
+ gst_object_unref (sinkpad);
+ gst_object_unref (srcpad);
gst_object_unref (pipeline);
}
fail_unless (target == NULL);
gst_object_unref (b1);
+ gst_object_unref (ghost);
}
GST_END_TEST;
gst_object_unref (ghost);
gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
/* source 2, setting the caps on the ghostpad does not influence the caps of
* the target */
gst_object_unref (ghost);
gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
/* clear caps on pads */
gst_pad_set_active (src, FALSE);
name_is_valid (const gchar * name, GstPadPresence presence)
{
GstPadTemplate *new;
- GstCaps *any = GST_CAPS_ANY;
+ GstCaps *any = gst_caps_new_any ();
new = gst_pad_template_new (name, GST_PAD_SRC, presence, any);
+ gst_caps_unref (any);
if (new) {
gst_object_unref (GST_OBJECT (new));
return TRUE;
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_found_tags (GST_ELEMENT (fakesrc), list);
+ gst_tag_list_free (list);
bus = gst_element_get_bus (pipeline);
message = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);
g_value_unset (&src2);
g_value_init (&src1, G_TYPE_STRING);
- g_value_set_string (&src1, "YUY2");
+ g_value_set_static_string (&src1, "YUY2");
g_value_init (&src2, GST_TYPE_LIST);
g_value_init (&item, G_TYPE_STRING);
- g_value_set_string (&item, "YUY2");
+ g_value_set_static_string (&item, "YUY2");
gst_value_list_append_value (&src2, &item);
- g_value_set_string (&item, "I420");
+ g_value_set_static_string (&item, "I420");
gst_value_list_append_value (&src2, &item);
- g_value_set_string (&item, "ABCD");
+ g_value_set_static_string (&item, "ABCD");
gst_value_list_append_value (&src2, &item);
fail_unless (gst_value_intersect (&dest, &src1, &src2));
g_value_unset (&src1);
g_value_unset (&src2);
+ g_value_unset (&dest);
}
GST_END_TEST;