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

Rafaël Carré funman at videolan.org
Thu Jan 24 14:27:07 CET 2013


Hello,

Le 24/01/2013 08:19, Mario Speiß a écrit :
> 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. 

Why "the lower 32 bits only" ?

It's not explicit in your patch.

> 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.

How can we know on which platforms this happens, only by experimentation?

> 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 */
> 




More information about the vlc-devel mailing list