From: David Schleef Date: Wed, 29 Oct 2003 23:10:49 +0000 (+0000) Subject: Allow NULL to be a valid value for factory->extensions. X-Git-Tag: CAPS-ROOT~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16fccf325d72325a695ccef8bd3fc44978025c46;p=platform%2Fupstream%2Fgstreamer.git Allow NULL to be a valid value for factory->extensions. Original commit message from CVS: Allow NULL to be a valid value for factory->extensions. --- diff --git a/gst/gsttypefind.c b/gst/gsttypefind.c index 77677d3..b87d4fd 100644 --- a/gst/gsttypefind.c +++ b/gst/gsttypefind.c @@ -159,7 +159,8 @@ gst_type_find_factory_get_caps (const GstTypeFindFactory *factory) * * Gets the extensions associated with a typefind factory. The returned * array should not be changed. If you need to change stuff in it, you should - * copy it using g_stdupv(). + * copy it using g_stdupv(). This function may return NULL to indicate + * a 0-length list. * * Returns: a NULL-terminated array of extensions associated with this factory */ diff --git a/gst/registries/gstxmlregistry.c b/gst/registries/gstxmlregistry.c index ca6b9f7..3f5493f 100644 --- a/gst/registries/gstxmlregistry.c +++ b/gst/registries/gstxmlregistry.c @@ -1490,9 +1490,11 @@ gst_xml_registry_save_feature (GstXMLRegistry *xmlregistry, GstPluginFeature *fe gst_xml_registry_save_caps (xmlregistry, factory->caps); CLASS (xmlregistry)->save_func (xmlregistry, "\n"); } */ - while (factory->extensions[i]) { - PUT_ESCAPED ("extension", factory->extensions[i]); - i++; + if (factory->extensions) { + while (factory->extensions[i]) { + PUT_ESCAPED ("extension", factory->extensions[i]); + i++; + } } } else if (GST_IS_SCHEDULER_FACTORY (feature)) {