[vlc-devel] [PATCH] aom: Disable module for WindowsXP

Steve Lhomme robux4 at ycbcr.xyz
Thu May 27 07:41:06 UTC 2021


Is this for 3.0 ?

IIRC these functions depend on the manifest and are not very reliable.

Here's how we detect it in direct3d9.c

     /* do not use D3D9 on XP unless forced */
     if (!vd->obj.force)
     {
         bool isVistaOrGreater = false;
         HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32.dll"));
         if (likely(hKernel32 != NULL))
             isVistaOrGreater = GetProcAddress(hKernel32, 
"EnumResourceLanguagesExW") != NULL;
         if (!isVistaOrGreater)
             return VLC_EGENERIC;
     }


On 2021-05-26 17:55, Hugo Beauzée-Luyssen wrote:
> It consistantly crashes on that platform and seems to behave properly
> starting from Windows Vista
> Fix #25745
> ---
>   modules/codec/aom.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/modules/codec/aom.c b/modules/codec/aom.c
> index 29e84f899f..fb36aaec30 100644
> --- a/modules/codec/aom.c
> +++ b/modules/codec/aom.c
> @@ -37,6 +37,10 @@
>   
>   #include "../packetizer/iso_color_tables.h"
>   
> +#ifdef _WIN32
> +#include <versionhelpers.h>
> +#endif
> +
>   /****************************************************************************
>    * Local prototypes
>    ****************************************************************************/
> @@ -289,6 +293,11 @@ static int OpenDecoder(vlc_object_t *p_this)
>       const aom_codec_iface_t *iface;
>       int av_version;
>   
> +#ifdef _WIN32
> +    if (!IsWindowsVistaOrGreater())
> +        return VLC_EGENERIC;
> +#endif
> +
>       if (dec->fmt_in.i_codec != VLC_CODEC_AV1)
>           return VLC_EGENERIC;
>   
> -- 
> 2.30.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list