plugin: warn if plugin name starts with a "

This can easily happen as side-effect of the plugin name
in GST_PLUGIN_DEFINE no longer being a string in 0.11, but
a name to G_STRINGIFY.
This commit is contained in:
Tim-Philipp Müller 2012-08-03 00:05:53 +01:00
parent 31eb27aa16
commit dc837f8f60

View file

@ -786,6 +786,11 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, package, filename);
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, origin, filename);
if (plugin->orig_desc->name != NULL && plugin->orig_desc->name[0] == '"') {
g_warning ("Invalid plugin name '%s' - fix your GST_PLUGIN_DEFINE "
"(remove quotes around plugin name)", plugin->orig_desc->name);
}
if (plugin->orig_desc->release_datetime != NULL &&
!check_release_datetime (plugin->orig_desc->release_datetime)) {
GST_ERROR ("GstPluginDesc for '%s' has invalid datetime '%s'",