[vlc-commits] Fix loading plugins still depending on unsafe config actions
Rémi Denis-Courmont
git at videolan.org
Sat May 14 21:43:58 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 14 22:43:18 2011 +0300| [47281ac209a120d4f85eb0d4b0bdb18be0730eb1] | committer: Rémi Denis-Courmont
Fix loading plugins still depending on unsafe config actions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47281ac209a120d4f85eb0d4b0bdb18be0730eb1
---
src/modules/modules.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/modules/modules.c b/src/modules/modules.c
index 6be4edc..fed683c 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -966,9 +966,9 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
{
module_t * p_module = NULL;
- /*
- * Check our plugins cache first then load plugin if needed
- */
+ /* msg_Dbg( p_this, "plugin \"%s\", %s",
+ p_module->psz_object_name, p_module->psz_longname ); */
+ /* Check our plugins cache first then load plugin if needed */
if( mode == CACHE_USE )
p_module = CacheFind( p_bank, path, mtime, size );
if( p_module == NULL )
@@ -978,15 +978,9 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
/* We have not already scanned and inserted this module */
assert( p_module->next == NULL );
- assert( !p_module->b_builtin );
-
- /* msg_Dbg( p_this, "plugin \"%s\", %s",
- p_module->psz_object_name, p_module->psz_longname ); */
- p_module->next = p_bank->head;
- p_bank->head = p_module;
- assert( p_module->next != NULL ); /* Insertion done */
/* Unload plugin until we really need it */
+ assert( !p_module->b_builtin );
if( p_module->b_loaded && p_module->b_unloadable )
{
module_Unload( p_module->handle );
@@ -1006,6 +1000,9 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
break;
}
+ p_module->next = p_bank->head;
+ p_bank->head = p_module;
+
if( mode == CACHE_IGNORE )
return 0;
More information about the vlc-commits
mailing list