Commit e3f5fb03 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

d3d11_fmt: keep track if we own the device or not

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent d54b3f14
......@@ -376,6 +376,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
dx_sys->d3ddev = sys->d3d_dev.d3ddevice;
sys->d3d_dev.d3dcontext = p_sys->context;
sys->d3d_dev.owner = false;
sys->d3dvidctx = d3dvidctx;
assert(p_sys->texture[KNOWN_DXGI_INDEX] != NULL);
......
......@@ -214,6 +214,12 @@ HRESULT D3D11_CreateDevice(vlc_object_t *obj, d3d11_handle_t *hd3d,
hr = E_NOTIMPL;
}
}
if (SUCCEEDED(hr))
{
out->owner = true;
}
return hr;
}
......
......@@ -33,6 +33,7 @@ typedef struct
{
ID3D11Device *d3ddevice; /* D3D device */
ID3D11DeviceContext *d3dcontext; /* D3D context */
bool owner;
} d3d11_device_t;
typedef struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment