[vlc-devel] [PATCH] direct3d11: rename the picture_sys_pool_t variable

Steve Lhomme robux4 at videolabs.io
Thu Jan 26 15:16:50 CET 2017


picsys sounded more like a picture_sys_t
---
 modules/video_output/win32/direct3d11.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 24f566d..22b745a 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1664,28 +1664,24 @@ static int Direct3D11CreatePool(vout_display_t *vd, video_format_t *fmt)
         /* a D3D11VA pool will be created when needed */
         return VLC_SUCCESS;
 
-    picture_sys_pool_t *picsys = calloc(1, sizeof(*picsys));
-    if (unlikely(picsys == NULL)) {
+    picture_sys_pool_t *poolsys = calloc(1, sizeof(*poolsys));
+    if (unlikely(poolsys == NULL)) {
         return VLC_ENOMEM;
     }
-
-    if ( sys->stagingQuad.pTexture != NULL )
-        picsys->texture  = sys->stagingQuad.pTexture;
-    else
-        picsys->texture  = sys->picQuad.pTexture;
-    picsys->vd       = vd;
+    poolsys->texture  = sys->picQuad.pTexture;
+    poolsys->vd       = vd;
 
     picture_resource_t resource = {
-        .p_sys = (picture_sys_t*) picsys,
+        .p_sys = (picture_sys_t*) poolsys,
         .pf_destroy = DestroyDisplayPicture,
     };
 
     picture_t *picture = picture_NewFromResource(fmt, &resource);
     if (!picture) {
-        free(picsys);
+        free(poolsys);
         return VLC_ENOMEM;
     }
-    ID3D11Texture2D_AddRef(picsys->texture);
+    ID3D11Texture2D_AddRef(poolsys->texture);
 
     picture_pool_configuration_t pool_cfg;
     memset(&pool_cfg, 0, sizeof(pool_cfg));
-- 
2.10.2



More information about the vlc-devel mailing list