From: Steve Lhomme Date: Tue, 3 Sep 2024 07:07:14 +0000 (+0200) Subject: hw/amf: keep the AMF version in the context X-Git-Tag: archive/raspbian/3.0.21-7+rpi1^2~66 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dc152f651ba5e378f3971819acd69839be74dc02;p=vlc.git hw/amf: keep the AMF version in the context For FRC we may need to disable it before 1.4.34. (cherry picked from commit de748458776f58f150edc06a4b9cac8c961dac20) Gbp-Pq: Name 0060-hw-amf-keep-the-AMF-version-in-the-context.patch --- diff --git a/modules/hw/amf/amf_helper.c b/modules/hw/amf/amf_helper.c index d83bef8a..f0f6eaec 100644 --- a/modules/hw/amf/amf_helper.c +++ b/modules/hw/amf/amf_helper.c @@ -21,12 +21,12 @@ int vlc_AMFCreateContext(struct vlc_amf_context *c) if (hLib == NULL) return (-ENOTSUP); - amf_uint64 version = 0; + c->Version = 0; AMF_RESULT res; AMFQueryVersion_Fn queryVersion = (AMFQueryVersion_Fn)GetProcAddress(hLib, AMF_QUERY_VERSION_FUNCTION_NAME); if (unlikely(queryVersion == NULL)) goto error; - res = queryVersion(&version); + res = queryVersion(&c->Version); if (unlikely(res != AMF_OK)) goto error; @@ -34,7 +34,7 @@ int vlc_AMFCreateContext(struct vlc_amf_context *c) c->Context = NULL; AMFInit_Fn init = (AMFInit_Fn)GetProcAddress(hLib, AMF_INIT_FUNCTION_NAME); - res = init(version, &c->pFactory); + res = init(c->Version, &c->pFactory); // use the highest possible value for that DLL if (unlikely(res != AMF_OK)) goto error; diff --git a/modules/hw/amf/amf_helper.h b/modules/hw/amf/amf_helper.h index ff8487af..6befb497 100644 --- a/modules/hw/amf/amf_helper.h +++ b/modules/hw/amf/amf_helper.h @@ -29,6 +29,7 @@ struct vlc_amf_context { AMT_TYPE(AMFFactory) *pFactory; AMT_TYPE(AMFContext) *Context; + amf_uint64 Version; void *Private; };