[vlc-devel] commit: Save the plugins cache as early as possible ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 25 19:31:20 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 25 20:29:56 2010 +0200| [b9a0fa9677d7084913a9499fd0050c0c952927b9] | committer: Rémi Denis-Courmont 

Save the plugins cache as early as possible

This rgeatly reduces the changes that it's generated more than once,
if there are multiple concurrent VLC's, or if VLC crashes before exit.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9a0fa9677d7084913a9499fd0050c0c952927b9
---

 src/modules/modules.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index ebc1d08..267267c 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -164,8 +164,6 @@ void module_EndBank( vlc_object_t *p_this, bool b_plugins )
     vlc_mutex_unlock( &module_lock );
 
 #ifdef HAVE_DYNAMIC_PLUGINS
-    if( p_bank->b_cache )
-        CacheSave( p_this, p_bank );
     while( p_bank->i_loaded_cache-- )
     {
         if( p_bank->pp_loaded_cache[p_bank->i_loaded_cache] )
@@ -215,6 +213,8 @@ void module_LoadPlugins( vlc_object_t * p_this, bool b_cache_delete )
         if( p_module_bank->b_cache || b_cache_delete )
             CacheLoad( p_this, p_module_bank, b_cache_delete );
         AllocateAllPlugins( p_this, p_module_bank );
+        if( p_module_bank->b_cache )
+            CacheSave( p_this, p_bank );
         config_UnsortConfig ();
         config_SortConfig ();
     }




More information about the vlc-devel mailing list