mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-03-13 09:00:40 +08:00
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 <kasper93@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user