gst/gsturi.c: Use the get_protocols_full vfunc if get_protocols is NULL. Fixes
authorRene Stadler <mail@renestadler.de>
Fri, 29 Feb 2008 14:23:17 +0000 (14:23 +0000)
committerRene Stadler <mail@renestadler.de>
Fri, 29 Feb 2008 14:23:17 +0000 (14:23 +0000)
Original commit message from CVS:
* gst/gsturi.c: (gst_uri_handler_get_protocols):
Use the get_protocols_full vfunc if get_protocols is NULL.  Fixes
URIHandlers implemented using language bindings.

ChangeLog
gst/gsturi.c

index e5e8149..ccfe4f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-29  Rene Stadler  <mail@renestadler.de>
+
+       * gst/gsturi.c: (gst_uri_handler_get_protocols):
+       Use the get_protocols_full vfunc if get_protocols is NULL.  Fixes
+       URIHandlers implemented using language bindings.
+
 2008-02-29  Sebastian Dröge  <slomo@circular-chaos.org>
 
        * gst/gstelementfactory.h:
index 31f8f1c..33727c3 100644 (file)
@@ -662,8 +662,14 @@ gst_uri_handler_get_protocols (GstURIHandler * handler)
 
   iface = GST_URI_HANDLER_GET_INTERFACE (handler);
   g_return_val_if_fail (iface != NULL, NULL);
-  g_return_val_if_fail (iface->get_protocols != NULL, NULL);
-  ret = iface->get_protocols ();
+  g_return_val_if_fail (iface->get_protocols != NULL ||
+      iface->get_protocols_full != NULL, NULL);
+
+  if (iface->get_protocols != NULL) {
+    ret = iface->get_protocols ();
+  } else {
+    ret = iface->get_protocols_full (G_OBJECT_TYPE (handler));
+  }
   g_return_val_if_fail (ret != NULL, NULL);
 
   return ret;