Merge branch 'nvenc' of github.com:loki-47-6F-64/sunshine into nvenc

This commit is contained in:
loki
2020-04-17 19:19:12 +02:00
2 changed files with 5 additions and 2 deletions

View File

@@ -1261,7 +1261,10 @@ util::Either<buffer_t, int> nv_d3d_make_hwdevice_ctx(platf::hwdevice_t *hwdevice
auto ctx = (AVD3D11VADeviceContext*)((AVHWDeviceContext*)ctx_buf->data)->hwctx;
std::fill_n((std::uint8_t*)ctx, sizeof(AVD3D11VADeviceContext), 0);
std::swap(ctx->device, *(ID3D11Device**)&hwdevice_ctx->data);
auto device = (ID3D11Device*)hwdevice_ctx->data;
device->AddRef();
ctx->device = device;
auto err = av_hwdevice_ctx_init(ctx_buf.get());
if(err) {