summaryrefslogtreecommitdiff
path: root/gst/frei0r
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-08-08 12:01:31 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-08-08 12:01:31 +0200
commit6050642addaad34600b1c30126cc28cf90bb7dc4 (patch)
tree746f7f45e1648258aeb2f597605c69f093f92c41 /gst/frei0r
parent1e3ec9e3bd798c7d9c30e328702a293ff53ec344 (diff)
downloadgstreamer-plugins-bad-6050642addaad34600b1c30126cc28cf90bb7dc4.tar.gz
frei0r: Only check the plugin filenames, not the directory names
Diffstat (limited to 'gst/frei0r')
-rw-r--r--gst/frei0r/gstfrei0r.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c
index b78343591..cfda1081d 100644
--- a/gst/frei0r/gstfrei0r.c
+++ b/gst/frei0r/gstfrei0r.c
@@ -594,7 +594,7 @@ register_plugins (GstPlugin * plugin, GHashTable * plugin_names,
GDir *dir;
gchar *filename;
const gchar *entry_name;
- gboolean ret = FALSE, this_ret;
+ gboolean ret = FALSE;
GST_DEBUG ("Scanning director '%s' for frei0r plugins", path);
@@ -603,8 +603,6 @@ register_plugins (GstPlugin * plugin, GHashTable * plugin_names,
return FALSE;
while ((entry_name = g_dir_read_name (dir))) {
- this_ret = FALSE;
-
if (g_hash_table_lookup_extended (plugin_names, entry_name, NULL, NULL))
continue;
@@ -614,13 +612,16 @@ register_plugins (GstPlugin * plugin, GHashTable * plugin_names,
|| g_str_has_suffix (filename, GST_EXTRA_MODULE_SUFFIX)
#endif
) && g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
+ gboolean this_ret;
+
this_ret = register_plugin (plugin, filename);
+ if (this_ret)
+ g_hash_table_insert (plugin_names, g_strdup (entry_name), NULL);
+
+ ret = ret && this_ret;
} else if (g_file_test (filename, G_FILE_TEST_IS_DIR)) {
- this_ret = register_plugins (plugin, plugin_names, filename);
+ ret = ret && register_plugins (plugin, plugin_names, filename);
}
- if (this_ret)
- g_hash_table_insert (plugin_names, g_strdup (entry_name), NULL);
- ret = ret && this_ret;
g_free (filename);
}
g_dir_close (dir);