[vlc-commits] d3d11_device: remove extra references to the ID3D11DeviceContext
    Steve Lhomme 
    git at videolan.org
       
    Mon Feb  3 16:59:03 CET 2020
    
    
  
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb  3 16:43:01 2020 +0100| [201e45893ad0a529c76201dc115a3aff4ac35e31] | committer: Steve Lhomme
d3d11_device: remove extra references to the ID3D11DeviceContext
We always have a valid d3d11_device_t in those cases, it will take care of the
proper references.
Also fixes a leak of ID3D11Device
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=201e45893ad0a529c76201dc115a3aff4ac35e31
---
 modules/hw/d3d11/d3d11_device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/hw/d3d11/d3d11_device.c b/modules/hw/d3d11/d3d11_device.c
index e7bc13264b..23e0b1b534 100644
--- a/modules/hw/d3d11/d3d11_device.c
+++ b/modules/hw/d3d11/d3d11_device.c
@@ -57,7 +57,7 @@ static void D3D11CloseDecoderDevice(vlc_decoder_device *device)
 {
     d3d11_decoder_device *sys = device->sys;
 
-    ID3D11DeviceContext_Release(sys->dec_device.device);
+    D3D11_ReleaseDevice(&sys->d3d_dev);
 
     D3D11_Destroy(&sys->hd3d);
 
@@ -144,7 +144,6 @@ static int D3D11OpenDecoderDevice(vlc_decoder_device *device, bool forced, vout_
     }
 
     sys->dec_device.device = sys->d3d_dev.d3dcontext;
-    ID3D11DeviceContext_AddRef(sys->dec_device.device);
 
     device->ops = &d3d11_dev_ops;
     device->opaque = &sys->dec_device;
    
    
More information about the vlc-commits
mailing list