[vlc-devel] [PATCH] Make cached module configuration on 64 bits work again

Mario Speiß 1034-135 at online.de
Thu Jan 24 08:19:28 CET 2013


This patch resolves the problems I encountered after applying the patch 
for src/modules/cache.c with the 64 bit version of vlc.

The structure is 64 bit large but the cached module configuration was 
fed with the lower 32 bits only. The bit fields containing b->removed 
etc. where not cached this way. That was also the reason for the qt 
expert configuration dialog when it came across "removed" configuration 
items (which where not recognized as removed by parsing plugins.dat).

Making the i_flags 64 bits large on 64 bit compilation resolves that.

Regards,
Mario
---
  include/vlc_configuration.h |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index acd1f41..d674ade 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -71,7 +71,11 @@ struct module_config_t
              unsigned    b_safe:1;       /* Safe in web plugins and 
playlists */
              unsigned    b_removed:1;                           /* 
Deprecated */
          };
+#ifdef _AMD64_
+        uint64_t flags;
+#else
          uint32_t flags;
+#endif
      };
      char *psz_type;                                 /* Configuration 
subtype */
      char *psz_name;                                           /* 
Option name */
-- 
1.7.5.4


On 19.01.2013 18:54, Mario Speiß wrote:
> On 19.01.2013 09:46, Rémi Denis-Courmont wrote:
>> Merged, thanks.
>>
>>
> I encounter some problems after applying this patch so i checked some
> things (no guarantee that i am right but i want to describe what i
> noticed), I use Win7x64 with mingw w64 and qt-intf mostly.
>
> Before this patch the module cache had *no* cache hits, so all modules
> load *and* unload on every startup. So far everything works fine.
>
> After applying the patch the module cache now obviously *has* cache hits
> (the bug before the patch prevents this) and *no* modules are loaded as
> the configuration of the plugins.dat is used. So far, so good.
>
> But if you try to modify some settings (in expert view) vlc crashed due
> to gettext-problems being caused by empty (i.e. NULL) config names!
>
> Also, if you avoid this crash by only opening, saving and closing the
> settings, the settings file is much smaller compared to before the patch.
>
> Last but not least vlc does not seem to parse the "plugins-cache"
> setting from vlcrc *before* the modules are loaded (i.e. this option has
> no use, the plugins.dat seems to be used anyway).
>
> I would recommend to revert this for now and to find out what is causing
> trouble here.
>
> Regards,
> Mario
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list