From: Tim-Philipp Müller Date: Sun, 3 Sep 2006 11:06:52 +0000 (+0000) Subject: gst/gstregistryxml.c: Print a warning rather than g_assert() if a plugin feature... X-Git-Tag: RELEASE-0_10_10~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a6b921f630b9aaae56ccdac8c7d7aceafc031d9;p=platform%2Fupstream%2Fgstreamer.git gst/gstregistryxml.c: Print a warning rather than g_assert() if a plugin feature is a URI handler but returns no prot... Original commit message from CVS: * gst/gstregistryxml.c: (gst_registry_xml_save_feature): Print a warning rather than g_assert() if a plugin feature is a URI handler but returns no protocols (#353976). --- diff --git a/ChangeLog b/ChangeLog index 48423d6..28a3992 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-03 Tim-Philipp Müller + + * gst/gstregistryxml.c: (gst_registry_xml_save_feature): + Print a warning rather than g_assert() if a plugin feature + is a URI handler but returns no protocols (#353976). + 2006-09-02 Stefan Kost * docs/random/moving-plugins: diff --git a/gst/gstregistryxml.c b/gst/gstregistryxml.c index d313dad..2e5a154 100644 --- a/gst/gstregistryxml.c +++ b/gst/gstregistryxml.c @@ -717,18 +717,22 @@ gst_registry_xml_save_feature (GstRegistry * registry, } if (GST_URI_TYPE_IS_VALID (factory->uri_type)) { - gchar **protocol; - if (!gst_registry_save_escaped (registry, " ", "uri_type", factory->uri_type == GST_URI_SINK ? "sink" : "source")) return FALSE; - g_assert (factory->uri_protocols); - protocol = factory->uri_protocols; - while (*protocol) { - if (!gst_registry_save_escaped (registry, " ", "uri_protocol", - *protocol)) - return FALSE; - protocol++; + if (factory->uri_protocols) { + gchar **protocol; + + protocol = factory->uri_protocols; + while (*protocol) { + if (!gst_registry_save_escaped (registry, " ", "uri_protocol", + *protocol)) + return FALSE; + protocol++; + } + } else { + g_warning ("GStreamer feature '%s' is URI handler but does not provide" + " any protocols it can handle", feature->name); } } } else if (GST_IS_TYPE_FIND_FACTORY (feature)) {