mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
Added a check to see if the plugin actually exists before even bothering to try to load it. Saves a fair amount of d...
Original commit message from CVS: Added a check to see if the plugin actually exists before even bothering to try to load it. Saves a fair amount of debugging spew with _gst_plugin_spew enabled.
This commit is contained in:
parent
61ed3b06ee
commit
47bd1b0545
1 changed files with 7 additions and 2 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#undef PLUGINS_USE_SRCDIR
|
||||
//#undef PLUGINS_USE_SRCDIR
|
||||
|
||||
/* list of loaded modules and its sequence number */
|
||||
GList *_gst_modules;
|
||||
|
@ -210,7 +210,7 @@ gboolean gst_plugin_load_absolute(gchar *name) {
|
|||
GstPluginInitFunc initfunc;
|
||||
GstPlugin *plugin;
|
||||
GList *plugins;
|
||||
|
||||
struct stat file_status;
|
||||
|
||||
if (g_module_supported() == FALSE) {
|
||||
g_print("gstplugin: wow, you built this on a platform without dynamic loading???\n");
|
||||
|
@ -230,6 +230,11 @@ gboolean gst_plugin_load_absolute(gchar *name) {
|
|||
}
|
||||
//g_print("trying to absolute load '%s\n",name);
|
||||
|
||||
if (stat(name,&file_status)) {
|
||||
// g_print("problem opening file %s\n",name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
module = g_module_open(name,G_MODULE_BIND_LAZY);
|
||||
if (module != NULL) {
|
||||
if (g_module_symbol(module,"plugin_init",(gpointer *)&initfunc)) {
|
||||
|
|
Loading…
Reference in a new issue