Force immediate destruction of the D3D11 swapchain
Possible fix for #959
This commit is contained in:
parent
d147d36867
commit
dc5414bd0d
1 changed files with 6 additions and 0 deletions
|
|
@ -141,6 +141,12 @@ D3D11VARenderer::~D3D11VARenderer()
|
||||||
av_buffer_unref(&m_HwFramesContext);
|
av_buffer_unref(&m_HwFramesContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force destruction of the swapchain immediately
|
||||||
|
if (m_DeviceContext != nullptr) {
|
||||||
|
m_DeviceContext->ClearState();
|
||||||
|
m_DeviceContext->Flush();
|
||||||
|
}
|
||||||
|
|
||||||
if (m_HwDeviceContext != nullptr) {
|
if (m_HwDeviceContext != nullptr) {
|
||||||
// This will release m_Device and m_DeviceContext too
|
// This will release m_Device and m_DeviceContext too
|
||||||
av_buffer_unref(&m_HwDeviceContext);
|
av_buffer_unref(&m_HwDeviceContext);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue