+2008-07-02 Tim-Philipp Müller <tim.muller at collabora co uk>
+
+ * gst/gstplugin.c: (CHECK_PLUGIN_DESC_FIELD), (gst_plugin_load_file):
+ Print error debug message if plugin description fields that should
+ be set are NULL.
+
+ * gst/gstregistrybinary.c: (gst_registry_binary_save_const_string):
+ Don't crash if the string to serialise is NULL (it really should
+ not be, but apparently this used to work with the xml registry ...).
+
2008-07-02 Thijs Vermeir <thijsvermeir@gmail.com>
* tools/gst-plot-timeline.py:
static GStaticMutex gst_plugin_loading_mutex = G_STATIC_MUTEX_INIT;
+#define CHECK_PLUGIN_DESC_FIELD(desc,field,fn) \
+ if (G_UNLIKELY ((desc)->field == NULL)) { \
+ GST_ERROR ("GstPluginDesc for '%s' has no %s", fn, G_STRINGIFY (field)); \
+ }
+
/**
* gst_plugin_load_file:
* @filename: the plugin filename to load
}
plugin->orig_desc = (GstPluginDesc *) ptr;
+ /* check plugin description: complain about bad values but accept them, to
+ * maintain backwards compatibility (FIXME: 0.11) */
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, name, filename);
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, description, filename);
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, version, filename);
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, license, filename);
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, source, filename);
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, package, filename);
+ CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, origin, filename);
+
GST_LOG ("Plugin %p for file \"%s\" prepared, calling entry function...",
plugin, filename);
{
GstBinaryChunk *chunk;
+ if (G_UNLIKELY (str == NULL)) {
+ GST_ERROR ("unexpected NULL string in plugin or plugin feature data");
+ str = "";
+ }
+
chunk = g_malloc (sizeof (GstBinaryChunk));
chunk->data = (gpointer) str;
chunk->size = strlen ((gchar *) chunk->data) + 1;