[vlc-commits] hw:d3d11:d3d11_instance: always set the d3dcontext even on failure

Steve Lhomme git at videolan.org
Fri Nov 24 16:28:11 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Nov 24 16:24:44 2017 +0100| [d947f063d8d3f7cc3cc8a3f512759e028705d48d] | committer: Jean-Baptiste Kempf

hw:d3d11:d3d11_instance: always set the d3dcontext even on failure

CID #1462218

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d947f063d8d3f7cc3cc8a3f512759e028705d48d
---

 modules/hw/d3d11/d3d11_instance.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/hw/d3d11/d3d11_instance.c b/modules/hw/d3d11/d3d11_instance.c
index 1011de4d84..0e19398eae 100644
--- a/modules/hw/d3d11/d3d11_instance.c
+++ b/modules/hw/d3d11/d3d11_instance.c
@@ -40,12 +40,10 @@ static size_t instances = 0;
 
 void D3D11_FilterHoldInstance(filter_t *filter, d3d11_device_t *out, D3D11_TEXTURE2D_DESC *dstDesc)
 {
+    out->d3dcontext = NULL;
     picture_t *pic = filter_NewPicture(filter);
     if (!pic)
-    {
-        out->d3dcontext = NULL;
         return;
-    }
 
     picture_sys_t *p_sys = ActivePictureSys(pic);
 



More information about the vlc-commits mailing list