[vlc-commits] d3d11_surface: set uninitialized picture_resource_t fields to 0

Steve Lhomme git at videolan.org
Fri Jul 19 15:29:50 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 19 14:30:40 2019 +0200| [83493d46018837da09d1bfb85fda721eb5a300f8] | committer: Steve Lhomme

d3d11_surface: set uninitialized picture_resource_t fields to 0

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

 modules/hw/d3d11/d3d11_surface.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 70f10d4967..afae5b58df 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -746,8 +746,9 @@ int D3D11OpenCPUConverter( vlc_object_t *obj )
     if (d3d_fourcc == 0)
         goto done;
 
-    picture_resource_t res;
-    res.pf_destroy = DestroyPicture;
+    picture_resource_t res = {
+        res.pf_destroy = DestroyPicture,
+    };
     picture_sys_d3d11_t *res_sys = calloc(1, sizeof(picture_sys_d3d11_t));
     if (res_sys == NULL) {
         err = VLC_ENOMEM;



More information about the vlc-commits mailing list