From 99867e9f16b0b5b9f78ac1cdc4577d76fa8369b4 Mon Sep 17 00:00:00 2001 From: Rene Stadler Date: Fri, 29 Feb 2008 14:23:17 +0000 Subject: [PATCH] gst/gsturi.c: Use the get_protocols_full vfunc if get_protocols is NULL. Fixes 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 | 6 ++++++ gst/gsturi.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5e8149..ccfe4f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-02-29 Rene Stadler + + * 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 * gst/gstelementfactory.h: diff --git a/gst/gsturi.c b/gst/gsturi.c index 31f8f1c..33727c3 100644 --- a/gst/gsturi.c +++ b/gst/gsturi.c @@ -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; -- 2.7.4