qsv: Initialize impl_value

Fixes: The warnings from CID1598553 Uninitialized scalar variable

Passing partly initialized structs is ugly and asking for hard to rieproduce bugs,
The uninitialized fields where not used

Reviewed-by: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-26 23:34:05 +02:00
parent 3c1915d776
commit c841cb45e8
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
2 changed files with 5 additions and 5 deletions

View File

@ -496,7 +496,7 @@ static int qsv_new_mfx_loader(AVCodecContext *avctx,
mfxStatus sts;
mfxLoader loader = NULL;
mfxConfig cfg;
mfxVariant impl_value;
mfxVariant impl_value = {0};
loader = MFXLoad();
if (!loader) {

View File

@ -839,7 +839,7 @@ static int qsv_d3d11_update_config(void *ctx, mfxHDL handle, mfxConfig cfg)
IDXGIDevice *pDXGIDevice = NULL;
HRESULT hr;
ID3D11Device *device = handle;
mfxVariant impl_value;
mfxVariant impl_value = {0};
hr = ID3D11Device_QueryInterface(device, &IID_IDXGIDevice, (void**)&pDXGIDevice);
if (SUCCEEDED(hr)) {
@ -913,7 +913,7 @@ static int qsv_d3d9_update_config(void *ctx, mfxHDL handle, mfxConfig cfg)
LUID luid;
D3DDEVICE_CREATION_PARAMETERS params;
HRESULT hr;
mfxVariant impl_value;
mfxVariant impl_value = {0};
hr = IDirect3DDeviceManager9_OpenDeviceHandle(devmgr, &device_handle);
if (FAILED(hr)) {
@ -995,7 +995,7 @@ static int qsv_va_update_config(void *ctx, mfxHDL handle, mfxConfig cfg)
VADisplayAttribute attr = {
.type = VADisplayPCIID,
};
mfxVariant impl_value;
mfxVariant impl_value = {0};
vas = vaGetDisplayAttributes(dpy, &attr, 1);
if (vas == VA_STATUS_SUCCESS && attr.flags != VA_DISPLAY_ATTRIB_NOT_SUPPORTED) {
@ -1036,7 +1036,7 @@ static int qsv_new_mfx_loader(void *ctx,
mfxStatus sts;
mfxLoader loader = NULL;
mfxConfig cfg;
mfxVariant impl_value;
mfxVariant impl_value = {0};
*ploader = NULL;
loader = MFXLoad();