1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avutil/hwcontext_qsv: fix format specifier for HRESULT

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow
2025-08-02 03:24:23 +02:00
parent 1a9924d794
commit ff52147f59

View File

@ -845,18 +845,18 @@ static int qsv_d3d11_update_config(void *ctx, mfxHDL handle, mfxConfig cfg)
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
hr = IDXGIDevice_GetAdapter(pDXGIDevice, &pDXGIAdapter); hr = IDXGIDevice_GetAdapter(pDXGIDevice, &pDXGIAdapter);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDXGIDevice_GetAdapter %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDXGIDevice_GetAdapter %#lx\n", hr);
IDXGIDevice_Release(pDXGIDevice); IDXGIDevice_Release(pDXGIDevice);
return ret; return ret;
} }
hr = IDXGIAdapter_GetDesc(pDXGIAdapter, &adapterDesc); hr = IDXGIAdapter_GetDesc(pDXGIAdapter, &adapterDesc);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDXGIAdapter_GetDesc %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDXGIAdapter_GetDesc %#lx\n", hr);
goto fail; goto fail;
} }
} else { } else {
av_log(ctx, AV_LOG_ERROR, "Error ID3D11Device_QueryInterface %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error ID3D11Device_QueryInterface %#lx\n", hr);
return ret; return ret;
} }
@ -917,47 +917,47 @@ static int qsv_d3d9_update_config(void *ctx, mfxHDL handle, mfxConfig cfg)
hr = IDirect3DDeviceManager9_OpenDeviceHandle(devmgr, &device_handle); hr = IDirect3DDeviceManager9_OpenDeviceHandle(devmgr, &device_handle);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error OpenDeviceHandle %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error OpenDeviceHandle %#lx\n", hr);
goto fail; goto fail;
} }
hr = IDirect3DDeviceManager9_LockDevice(devmgr, device_handle, &device, TRUE); hr = IDirect3DDeviceManager9_LockDevice(devmgr, device_handle, &device, TRUE);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error LockDevice %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error LockDevice %#lx\n", hr);
IDirect3DDeviceManager9_CloseDeviceHandle(devmgr, device_handle); IDirect3DDeviceManager9_CloseDeviceHandle(devmgr, device_handle);
goto fail; goto fail;
} }
hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9Ex, (void **)&device_ex); hr = IDirect3DDevice9_QueryInterface(device, &IID_IDirect3DDevice9Ex, (void **)&device_ex);
IDirect3DDevice9_Release(device); IDirect3DDevice9_Release(device);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9_QueryInterface %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9_QueryInterface %#lx\n", hr);
goto unlock; goto unlock;
} }
hr = IDirect3DDevice9Ex_GetCreationParameters(device_ex, &params); hr = IDirect3DDevice9Ex_GetCreationParameters(device_ex, &params);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9_GetCreationParameters %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9_GetCreationParameters %#lx\n", hr);
IDirect3DDevice9Ex_Release(device_ex); IDirect3DDevice9Ex_Release(device_ex);
goto unlock; goto unlock;
} }
hr = IDirect3DDevice9Ex_GetDirect3D(device_ex, &d3d9); hr = IDirect3DDevice9Ex_GetDirect3D(device_ex, &d3d9);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9Ex_GetDirect3D %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9Ex_GetDirect3D %#lx\n", hr);
IDirect3DDevice9Ex_Release(device_ex); IDirect3DDevice9Ex_Release(device_ex);
goto unlock; goto unlock;
} }
hr = IDirect3D9_QueryInterface(d3d9, &IID_IDirect3D9Ex, (void **)&d3d9ex); hr = IDirect3D9_QueryInterface(d3d9, &IID_IDirect3D9Ex, (void **)&d3d9ex);
IDirect3D9_Release(d3d9); IDirect3D9_Release(d3d9);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDirect3D9_QueryInterface3D %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDirect3D9_QueryInterface3D %#lx\n", hr);
IDirect3DDevice9Ex_Release(device_ex); IDirect3DDevice9Ex_Release(device_ex);
goto unlock; goto unlock;
} }
hr = IDirect3D9Ex_GetAdapterLUID(d3d9ex, params.AdapterOrdinal, &luid); hr = IDirect3D9Ex_GetAdapterLUID(d3d9ex, params.AdapterOrdinal, &luid);
if (FAILED(hr)) { if (FAILED(hr)) {
av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9Ex_GetAdapterLUID %d\n", hr); av_log(ctx, AV_LOG_ERROR, "Error IDirect3DDevice9Ex_GetAdapterLUID %#lx\n", hr);
goto release; goto release;
} }