diff --git a/pre-compiled b/pre-compiled index 51f776db..8ec14fd4 160000 --- a/pre-compiled +++ b/pre-compiled @@ -1 +1 @@ -Subproject commit 51f776dbd4b2ead239a966406447d12f7e942636 +Subproject commit 8ec14fd4a40d85443084b283ab24415d729984cb diff --git a/sunshine/video.cpp b/sunshine/video.cpp index 1325bce4..6246f31d 100644 --- a/sunshine/video.cpp +++ b/sunshine/video.cpp @@ -1255,7 +1255,10 @@ util::Either 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) {