+2008-08-21 Stefan Kost <ensonic@users.sf.net>
+
+ * tests/examples/seek/seek.c:
+ Don't crash when having no visualisations.
+
2008-08-16 David Schleef <ds@schleef.org>
* gst/typefind/gsttypefindfunctions.c: DV typefinding. Remove
/* get the selected index and get the factory for this index */
index = gtk_combo_box_get_active (GTK_COMBO_BOX (vis_combo));
- entry = &g_array_index (vis_entries, VisEntry, index);
- /* create an instance of the element from the factory */
- element = gst_element_factory_create (entry->factory, NULL);
- if (!element)
- return;
-
- /* set vis plugin for playbin2 */
- g_object_set (pipeline, "vis-plugin", element, NULL);
+ if (vis_entries->len > 0) {
+ entry = &g_array_index (vis_entries, VisEntry, index);
+
+ /* create an instance of the element from the factory */
+ element = gst_element_factory_create (entry->factory, NULL);
+ if (!element)
+ return;
+
+ /* set vis plugin for playbin2 */
+ g_object_set (pipeline, "vis-plugin", element, NULL);
+ }
}
static void