summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-07-03 14:04:32 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-07-03 14:11:32 +0100
commit9b1bf88d7df91983ea9edceda6b993e5713fc2e4 (patch)
treebb1eb3ef7cd41e91716e490ad433a723f2cf2e8c
parent2f149355cd449e7f3a653103c4b8d26204e92226 (diff)
checks: don't assume element factory is not loaded yet
It may already be loaded if check is being run with CK_FORK=no. See #623469.
-rw-r--r--tests/check/gst/gstelement.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/check/gst/gstelement.c b/tests/check/gst/gstelement.c
index 3ec98e6b41..9544b6d1a7 100644
--- a/tests/check/gst/gstelement.c
+++ b/tests/check/gst/gstelement.c
@@ -175,10 +175,13 @@ GST_START_TEST (test_class)
factory = gst_element_factory_find ("queue");
fail_if (factory == NULL);
- GST_DEBUG ("getting the type");
- /* feature is not loaded, should return 0 as the type */
- type = gst_element_factory_get_element_type (factory);
- fail_if (type != 0);
+ /* it may already be loaded if check is being run with CK_FORK=no */
+ if (!GST_PLUGIN_FEATURE (factory)->loaded) {
+ GST_DEBUG ("getting the type");
+ /* feature is not loaded, should return 0 as the type */
+ type = gst_element_factory_get_element_type (factory);
+ fail_if (type != 0);
+ }
GST_DEBUG ("now loading the plugin");
tmp =