This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 5074d9f06e hwcontext_amf: fix version variable type and remove cast
5074d9f06e is described below

commit 5074d9f06e8a191104614ef14afa1d1aa7d406ec
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Wed Mar 11 15:40:59 2026 +0100
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Wed Mar 11 18:41:10 2026 +0000

    hwcontext_amf: fix version variable type and remove cast
    
    Fixes compilation errors on newer Clang/GCC that errors out on
    incompatible pointers.
    
    error: incompatible pointer types passing 'unsigned long long *' to
    parameter of type 'amf_uint64 *' (aka 'unsigned long *')
    [-Wincompatible-pointer-types]
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavutil/hwcontext_amf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_amf.c b/libavutil/hwcontext_amf.c
index 4ccbe36c98..822f726c0f 100644
--- a/libavutil/hwcontext_amf.c
+++ b/libavutil/hwcontext_amf.c
@@ -615,8 +615,10 @@ static int amf_load_library(AVAMFDeviceContext* amf_ctx,  
void* avcl)
     version_fun = (AMFQueryVersion_Fn)dlsym(amf_ctx->library, 
AMF_QUERY_VERSION_FUNCTION_NAME);
     AMF_RETURN_IF_FALSE(avcl, version_fun != NULL, AVERROR_UNKNOWN, "DLL %s 
failed to find function %s\n", AMF_DLL_NAMEA, AMF_QUERY_VERSION_FUNCTION_NAME);
 
-    res = version_fun((unsigned long long*)&amf_ctx->version);
+    amf_uint64 version;
+    res = version_fun(&version);
     AMF_RETURN_IF_FALSE(avcl, res == AMF_OK, AVERROR_UNKNOWN, "%s failed with 
error %d\n", AMF_QUERY_VERSION_FUNCTION_NAME, res);
+    amf_ctx->version = version;
     res = init_fun(AMF_FULL_VERSION, &amf_ctx->factory);
     AMF_RETURN_IF_FALSE(avcl, res == AMF_OK, AVERROR_UNKNOWN, "%s failed with 
error %d\n", AMF_INIT_FUNCTION_NAME, res);
     return 0;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to