mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
tests/examples/seek/seek.c: Don't crash when having no visualisations.
Original commit message from CVS: * tests/examples/seek/seek.c: Don't crash when having no visualisations.
This commit is contained in:
parent
7cce52603e
commit
ca5d4c1fcb
2 changed files with 15 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2008-08-16 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/typefind/gsttypefindfunctions.c: DV typefinding. Remove
|
* gst/typefind/gsttypefindfunctions.c: DV typefinding. Remove
|
||||||
|
|
|
@ -1846,14 +1846,17 @@ vis_combo_cb (GtkComboBox * combo, GstPipeline * pipeline)
|
||||||
|
|
||||||
/* get the selected index and get the factory for this index */
|
/* get the selected index and get the factory for this index */
|
||||||
index = gtk_combo_box_get_active (GTK_COMBO_BOX (vis_combo));
|
index = gtk_combo_box_get_active (GTK_COMBO_BOX (vis_combo));
|
||||||
entry = &g_array_index (vis_entries, VisEntry, index);
|
if (vis_entries->len > 0) {
|
||||||
/* create an instance of the element from the factory */
|
entry = &g_array_index (vis_entries, VisEntry, index);
|
||||||
element = gst_element_factory_create (entry->factory, NULL);
|
|
||||||
if (!element)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* set vis plugin for playbin2 */
|
/* create an instance of the element from the factory */
|
||||||
g_object_set (pipeline, "vis-plugin", element, NULL);
|
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
|
static void
|
||||||
|
|
Loading…
Reference in a new issue