be more lenient when loading unconnected pads
authorAndy Wingo <wingo@pobox.com>
Fri, 12 Jul 2002 19:13:19 +0000 (19:13 +0000)
committerAndy Wingo <wingo@pobox.com>
Fri, 12 Jul 2002 19:13:19 +0000 (19:13 +0000)
Original commit message from CVS:
be more lenient when loading unconnected pads

gst/cothreads.c
gst/gstpad.c
gst/gstplugin.c

index a4d7257..5a32c6d 100644 (file)
@@ -497,10 +497,8 @@ cothread_stackquery (void **stack, glong* stacksize)
 {
   /* wingo says: use posix_memalign to allocate a 2M-aligned, 2M stack */
 
-  int retval = 0;
-
 #ifdef HAVE_POSIX_MEMALIGN
-  retval = posix_memalign (stack, STACK_SIZE, STACK_SIZE);
+  int retval = posix_memalign (stack, STACK_SIZE, STACK_SIZE);
   if (retval != 0)
   {
     g_warning ("Could not posix_memalign stack !\n");
index 29a7e75..f478190 100644 (file)
@@ -1732,6 +1732,12 @@ gst_pad_load_and_connect (xmlNodePtr self,
 
   split = g_strsplit (peer, ".", 2);
 
+  if (split[0] == NULL || split[1] == NULL) {
+    GST_DEBUG (GST_CAT_XML, "Could not parse peer '%s' for pad %s:%s, leaving it unconnected",
+               peer, GST_DEBUG_PAD_NAME (pad));
+    return;
+  }
+  
   g_return_if_fail (split[0] != NULL);
   g_return_if_fail (split[1] != NULL);
 
index 273078d..e80cb0d 100644 (file)
@@ -218,15 +218,6 @@ gst_plugin_load_plugin (GstPlugin *plugin, GError **error)
                  filename, g_module_error());
     return FALSE;
   }
-
-  /* FIXME: this should not happen */
-  g_set_error (error,
-               GST_PLUGIN_ERROR,
-               GST_PLUGIN_ERROR_MODULE,
-               "Error loading plugin %s, reason: %s\n",
-               filename, 
-              "fell of the end of the gst_plugin_load_plugin function");
-  return FALSE;
 }