[vlc-devel] [PATCH] aom: Disable module for WindowsXP
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu May 27 08:17:02 UTC 2021
On Thu, May 27, 2021, at 9:41 AM, Steve Lhomme wrote:
> Is this for 3.0 ?
It is
>
> 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;
> }
>
I can definitely use the same code if you have seen occurrences of the dedicated function failing.
I've tested it on XP and Windows 10 but definitely not everything in between.
>
> 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
> >
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list