mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
plugin: Fail if no valid plugin metadata is set
This commit is contained in:
parent
8e98ce54e1
commit
cfc7661f65
1 changed files with 4 additions and 4 deletions
|
@ -653,8 +653,9 @@ check_release_datetime (const gchar * date_time)
|
||||||
static GMutex gst_plugin_loading_mutex;
|
static GMutex gst_plugin_loading_mutex;
|
||||||
|
|
||||||
#define CHECK_PLUGIN_DESC_FIELD(desc,field,fn) \
|
#define CHECK_PLUGIN_DESC_FIELD(desc,field,fn) \
|
||||||
if (G_UNLIKELY ((desc)->field == NULL)) { \
|
if (G_UNLIKELY ((desc)->field == NULL || *(desc)->field == '\0')) { \
|
||||||
GST_ERROR ("GstPluginDesc for '%s' has no %s", fn, G_STRINGIFY (field)); \
|
g_warning ("Plugin description for '%s' has no valid %s field", fn, G_STRINGIFY (field)); \
|
||||||
|
goto return_error; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -776,8 +777,7 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
|
||||||
plugin->orig_desc = desc;
|
plugin->orig_desc = desc;
|
||||||
|
|
||||||
if (new_plugin) {
|
if (new_plugin) {
|
||||||
/* check plugin description: complain about bad values but accept them, to
|
/* check plugin description: complain about bad values and fail */
|
||||||
* maintain backwards compatibility (FIXME: 0.11) */
|
|
||||||
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, name, filename);
|
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, description, filename);
|
||||||
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, version, filename);
|
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, version, filename);
|
||||||
|
|
Loading…
Reference in a new issue