gst/gstelement.override (_wrap_gst_element_link): Allow errors parsing the optional...
authorAndy Wingo <wingo@pobox.com>
Fri, 7 Apr 2006 14:54:49 +0000 (14:54 +0000)
committerAndy Wingo <wingo@pobox.com>
Fri, 7 Apr 2006 14:54:49 +0000 (14:54 +0000)
Original commit message from CVS:
2006-04-07  Andy Wingo  <wingo@pobox.com>

* gst/gstelement.override (_wrap_gst_element_link): Allow errors
parsing the optional filter caps to propagate up.

ChangeLog
gst/gstelement.override

index 5db725c..cb7ae77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-04-07  Andy Wingo  <wingo@pobox.com>
 
+       * gst/gstelement.override (_wrap_gst_element_link): Allow errors
+       parsing the optional filter caps to propagate up.
+
        * gst/gst.defs (element_make_from_uri): Element name is optional
        and can be None. It defaults to None.
 
index 5dbd539..ec8a219 100644 (file)
@@ -179,8 +179,13 @@ _wrap_gst_element_link(PyGObject *self, PyObject *args, PyObject *kwargs)
         return NULL;
     if (py_caps == NULL)
       caps = NULL;
-    else
+    else {
       caps = pygst_caps_from_pyobject (py_caps, &caps_is_copy);
+      if (caps == NULL)
+        /* an error happened, propagate up */
+        return NULL;
+    }
+
     ret = gst_element_link_filtered(GST_ELEMENT(self->obj), GST_ELEMENT(dest->obj), caps);
     if (caps && caps_is_copy)
         gst_caps_unref (caps);