hwcontext_dxva2: initialize D3DDISPLAYMODEEX correctly
authorwm4 <nfxjfg@googlemail.com>
Thu, 4 Jan 2018 14:52:46 +0000 (15:52 +0100)
committerwm4 <nfxjfg@googlemail.com>
Thu, 4 Jan 2018 14:52:46 +0000 (15:52 +0100)
libavutil/hwcontext_dxva2.c

index 44ebdbc..665c2d6 100644 (file)
@@ -485,6 +485,7 @@ static int dxva2_device_create9ex(AVHWDeviceContext *ctx, UINT adapter)
     if (FAILED(hr))
         return AVERROR_UNKNOWN;
 
+    modeex.Size = sizeof(D3DDISPLAYMODEEX);
     hr = IDirect3D9Ex_GetAdapterDisplayModeEx(d3d9ex, adapter, &modeex, NULL);
     if (FAILED(hr)) {
         IDirect3D9Ex_Release(d3d9ex);