summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sourceforge.net>2009-01-08 13:41:19 +0000
committerStefan Kost <ensonic@users.sourceforge.net>2009-01-08 13:41:19 +0000
commit291c2822f898ea0fb42a434365fb04b96ae7b56e (patch)
treee458f11c464bbec23df4a57f967b0350d5bf2423
parentb8b0c80b299fef59739dde3e0c181b0b29c5f45e (diff)
gst/gst.c: Create a registry if there is none also when the option for gst-disable-registry-update has been selected....
Original commit message from CVS: * gst/gst.c: Create a registry if there is none also when the option for gst-disable-registry-update has been selected. Fixes #567002
-rw-r--r--ChangeLog6
-rw-r--r--gst/gst.c21
2 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 588f247b9..767304961 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-08 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/gst.c:
+ Create a registry if there is none also when the option for
+ gst-disable-registry-update has been selected. Fixes #567002
+
2009-01-06 Tim-Philipp Müller <tim.muller at collabora co uk>
* gst/gst.c: (init_post):
diff --git a/gst/gst.c b/gst/gst.c
index 50710f4f6..ff18b0c6f 100644
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -903,6 +903,7 @@ ensure_current_registry (GError ** error)
gboolean ret = TRUE;
gboolean do_fork;
gboolean do_update;
+ gboolean have_cache;
default_registry = gst_registry_get_default ();
registry_file = g_strdup (g_getenv ("GST_REGISTRY"));
@@ -918,19 +919,23 @@ ensure_current_registry (GError ** error)
GST_INFO ("reading registry cache: %s", registry_file);
#ifdef USE_BINARY_REGISTRY
- gst_registry_binary_read_cache (default_registry, registry_file);
+ have_cache = gst_registry_binary_read_cache (default_registry, registry_file);
#else
- gst_registry_xml_read_cache (default_registry, registry_file);
+ have_cache = gst_registry_xml_read_cache (default_registry, registry_file);
#endif
- do_update = !_gst_disable_registry_update;
- if (do_update) {
- const gchar *update_env;
+ if (have_cache) {
+ do_update = !_gst_disable_registry_update;
+ if (do_update) {
+ const gchar *update_env;
- if ((update_env = g_getenv ("GST_REGISTRY_UPDATE"))) {
- /* do update for any value different from "no" */
- do_update = (strcmp (update_env, "no") != 0);
+ if ((update_env = g_getenv ("GST_REGISTRY_UPDATE"))) {
+ /* do update for any value different from "no" */
+ do_update = (strcmp (update_env, "no") != 0);
+ }
}
+ } else {
+ do_update = TRUE;
}
if (do_update) {