mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
plugin: protect against NULL filename in debug
See https://bugzilla.gnome.org/show_bug.cgi?id=689948
This commit is contained in:
parent
064145c097
commit
21830d66c6
1 changed files with 7 additions and 5 deletions
|
@ -481,7 +481,7 @@ gst_plugin_register_func (GstPlugin * plugin, const GstPluginDesc * desc,
|
|||
if (!gst_plugin_check_version (desc->major_version, desc->minor_version)) {
|
||||
if (GST_CAT_DEFAULT)
|
||||
GST_WARNING ("plugin \"%s\" has incompatible version, not loading",
|
||||
plugin->filename);
|
||||
GST_STR_NULL (plugin->filename));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -489,14 +489,14 @@ gst_plugin_register_func (GstPlugin * plugin, const GstPluginDesc * desc,
|
|||
!desc->package || !desc->origin) {
|
||||
if (GST_CAT_DEFAULT)
|
||||
GST_WARNING ("plugin \"%s\" has incorrect GstPluginDesc, not loading",
|
||||
plugin->filename);
|
||||
GST_STR_NULL (plugin->filename));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!gst_plugin_check_license (desc->license)) {
|
||||
if (GST_CAT_DEFAULT)
|
||||
GST_WARNING ("plugin \"%s\" has invalid license \"%s\", not loading",
|
||||
plugin->filename, desc->license);
|
||||
GST_STR_NULL (plugin->filename), desc->license);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -514,13 +514,15 @@ gst_plugin_register_func (GstPlugin * plugin, const GstPluginDesc * desc,
|
|||
if (user_data) {
|
||||
if (!(((GstPluginInitFullFunc) (desc->plugin_init)) (plugin, user_data))) {
|
||||
if (GST_CAT_DEFAULT)
|
||||
GST_WARNING ("plugin \"%s\" failed to initialise", plugin->filename);
|
||||
GST_WARNING ("plugin \"%s\" failed to initialise",
|
||||
GST_STR_NULL (plugin->filename));
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
if (!((desc->plugin_init) (plugin))) {
|
||||
if (GST_CAT_DEFAULT)
|
||||
GST_WARNING ("plugin \"%s\" failed to initialise", plugin->filename);
|
||||
GST_WARNING ("plugin \"%s\" failed to initialise",
|
||||
GST_STR_NULL (plugin->filename));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue